nitram
Witchraft combine monads, or where is discussion about witchraft?
Hello everibady,
recently I started experimenting with algae, and I found out that in a lot of cases I need to combine multiple monads. Is there way of do it in this library? Quick search show that in haskell they use something called monad transformers. Is it on the read map, or is there some witchcraft specific trick? Or how would you do it without transformers?
I’m particulary interested in merging State and Writer monads.
Thank you
Most Liked
OvermindDL1
I wonder if @expede exists to be able to ask, hmm I guess not. Maybe it’s worth raising this combination issue on the witchcraft issue tracker? It would be a useful thing to add. ![]()
nitram
Yes they are:
Qqwy
To my knowledge, currently there unfortunately isn’t a monad transformer stack implementation for Witchcraft, so you probably have to define them yourself.
An alternative might be to look into ‘effect systems’ and model effectful computations using that instead. (c.f. the Haskell library fused-effects)
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









