Skip to content

Instantly share code, notes, and snippets.

@notyy
Created March 17, 2012 06:09
Show Gist options
  • Save notyy/2055676 to your computer and use it in GitHub Desktop.
Save notyy/2055676 to your computer and use it in GitHub Desktop.
stru in haskell
withValueChecked :: Maybe a -> (a -> Maybe b) -> Maybe b
withValueChecked (Just x) f = f x
withValueChecked Nothing f = Nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment