2 ms·
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 fu
by batgaijin 14y ago
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
- trhtrsh 14y agoAnd what if you want to do two things? Then you try to use monad transformers until you collapse in a heap.