Guest User

Untitled

a guest
Dec 18th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. f_Just :: Maybe Int -> Int
  2. f_Just (Just a) = a
  3.  
  4. f_Nothing :: Int
  5. f_Nothing = 0
  6.  
  7. f :: Maybe Int -> Int
  8. f x = case x of
  9. Just a -> f_Just a
  10. Nothing -> f_Nothing
Add Comment
Please, Sign In to add comment