Created
May 10, 2017 16:47
-
-
Save ethagnawl/7899fa306b05a30610dd088a67c1e377 to your computer and use it in GitHub Desktop.
bind type confusion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- (>>=) :: 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