Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



This is the approach of the popular book Functional Programming in Scala.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: