Created
May 29, 2014 16:31
-
-
Save diegs/5af77a47a95e91fcaf84 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| test1 :: String -> Maybe Integer | |
| test1 "a" = Just 1 | |
| test1 _ = Nothing | |
| test2 :: Integer -> Integer | |
| test2 = (1+) | |
| test3 :: String -> Maybe Integer | |
| test3 = test2 <$> test1 | |
| test3' :: String -> Maybe Integer | |
| test3' str = test2 <$> (test1 str) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment