Skip to content

Instantly share code, notes, and snippets.

@ethagnawl
Created May 10, 2017 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethagnawl/7899fa306b05a30610dd088a67c1e377 to your computer and use it in GitHub Desktop.
Save ethagnawl/7899fa306b05a30610dd088a67c1e377 to your computer and use it in GitHub Desktop.
bind type confusion
-- (>>=) :: Monad m => m a -> (a -> m b) -> m b
-- why are `a` and `b` different? i guess that signature means
-- they _can_ be but don't _need_ to be.
Just 5 >>= (\a -> Just (10 + a)) -- Just 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment