Created
June 9, 2015 15:01
-
-
Save gimKondo/ab1227c4b75a969e5dfc 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
-- Ordering and De-maybe Evaluating Nonsense operator | |
(-#@|>) :: Maybe a -> (a->b) -> Maybe b | |
Just x -#@|> f = Just (f x) | |
Nothing -#@|> _ = Nothing | |
main :: IO() | |
main = do | |
print $ Nothing -#@|> (+ 3) | |
print $ Just 2 -#@|> (+ 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment