3 ms·
Put another way, use each monad instance on its own, and ignore that it's a monad in the first place (ie. use the IO monad, but pretend the syntax is IO specifi
by neilparikh 5y ago
Put another way, use each monad instance on its own, and ignore that it's a monad in the first place (ie. use the IO monad, but pretend the syntax is IO specific, use the List monad, but pretend the syntax is List specific etc.)
After you do enough of these, you'll start to see the common pattern, and wish there was a way to abstract over them. Surprise: there is!
This is basically I assume monads were developed as well.
- acjohnson55 5y agoThis is the approach of the popular book Functional Programming in Scala.
- deleted 5y ago[deleted]