Created
August 13, 2014 16:01
-
-
Save doismellburning/c6f2c844a62e3ef90406 to your computer and use it in GitHub Desktop.
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
-- Does this function already exist? Because it's not liftA2 / liftM2 | |
foo :: (a -> a -> a) -> Maybe a -> Maybe a -> Maybe a | |
foo f x Nothing = x | |
foo f Nothing x = x | |
foo f (Just x) (Just y) = Just (f x y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment