3 comments

[ 0.16 ms ] story [ 17.2 ms ] thread
What is >>= here?

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

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.

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