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

Okay here is an awesome description of monads: a function buddy!

Want to print out parts of a function? Want to log something? Don't add an argument to your function! Use a monad!

Basically if you have something orthogonal you want to do with a functions results, use a monad. You don't have to pass everything as an argument explicitly any more!

P.s. don't listen to this until a haskell demigod corrects me



And what if you want to do two things? Then you try to use monad transformers until you collapse in a heap.




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

Search: