4 ms·
Think of Monad (and really the whole typeclassopedia in a way) like Iterable in Java what does it gives you? for loops what do the haskell things give you? va
by whateveracct 5mo ago
Think of Monad (and really the whole typeclassopedia in a way) like Iterable in Java
what does it gives you? for loops
what do the haskell things give you? various types of for loops. monads in particular have `do` which is a language construct. but the rest are just higher order functions that are specific types of `for` loops
you learn a handful of these and then all programs are the same. you can whisk together complex control flow across domains with the same few abstractions. you can hop into a library, see these type class instances, and know how to use the library.
stuff like that.