Hacker News new | past | comments | ask | show | jobs | submit login

> How is 'm >>= f' pronounced?

How do you pronounce '4 + 5'? It's easy, because you don't try to pronounce '+', you pronounce 'plus'. With '>>=', there are a few names that all mean the same thing.

There are two primary names, 'bind' and 'chain', and a description 'feed':

bind (the result of) m to (the input of) f

chain (the result of) m into f

feed m to f

There are probably a couple more things that can be said, in different contexts, but these three cover the majority use case.




Thanks for the very complete answer!

That those terms are not mentioned in the article (titled "What I Wish I Knew When Learning Haskell", so apparently meant for people being new to the concepts) is my actual criticism. The ability to instinctively replace those symbols with the appropriate terms is something that has to be learned - and easy to forget to teach. He's talking about "don't learn monads by analogies" because he's maybe not fully aware that he is using "bind", "chain", "feed" when actually reading those expressions - all of which are analogies.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: