The particular monad I've described is roughly like Haskell's IO
monad, though I've left all calls to writeIORef
, readIORef
and newIORef
implicit. Also, the let-in
in the repeat15
should really be a call to -->
. I've simplified that for the purposes of demonstration. There are many other monads, as well. It remains the case that -->
is the basic "action combining" operation. In Haskell, this is called >>=
. Likewise, the Haskell name for ;;
is >>
. There's also an operation that will take a "regular value" and give you an action that simply produces that value without doing anything else. This is sometimes called (in Haskell) pure
or (confusingly) return
. It's also sometimes called "unit."