@popefucker@cybre.space sorry, I should have given you the type! It's kinda complex, so let me show you compose first:

(.) :: (b -> c) -> (a -> b) -> (a -> c)

this says "the compose function takes 2 arguments, a function from b to c and a function from a to b, and then returns a function from a to c"

>>= (which is called "bind") is:

(>>=) :: IO a -> (a -> b) -> IO b

which says "the bind function takes 2 arguments, something of type IO a and a function from a to b, then returns something of type IO b"

Follow

@popefucker@cybre.space side note: (>>=) is actually defined over *any* monad, not just IO

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!