Hacker News new | ask | show | jobs
by throw_await 42 days ago
And by introducing Monad, we gain the ability to abstract over these things: List, Option, Result, Functions, State, ...
1 comments

yes, which is why Monad should be an interface that types like List, Option, Result etc implement, instead of flatMap being just a random discrete function that exists on random types by accident, with no common abstract link between them

Kotlin, Java, basically every other language except Haskell, F# etc didn't get that memo