Hacker News new | past | comments | ask | show | jobs | submit login
A Burrito Is a Monad (williamcotton.com)
3 points by williamcotton 10 months ago | hide | past | favorite | 3 comments



What is >>= here?

I guess this is Haskel code, though I never touched this language.


The definition of >>= here is provided by the let statement. Infix operators can be parenthesised like (>>=) to use or define them as prefix functions.


It's F#!

The >>= is an infix operator for the "bind" function, a function that takes a wrapped value (the Burrito) and a function that takes a value and returns a wrapped value (like addIngredient). It's a design pattern in functional languages like Haskell, F#, and OCaml.




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

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

Search: