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

i like to explain monads as the same sort of thinking process as a 'design pattern' in OOP. People who have done OOP would have heard of things like the visitor pattern. In OOP, patterns aren't unified in some class, but could be.

Monads (and type classes in general) are like design patterns in OOP, in that they encode a common use case. Except in haskall, you can encode this pattern into the language semantics.



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

Search: