Skip to content

Instantly share code, notes, and snippets.

@teivah
Created March 16, 2024 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teivah/e70fe5f64afe388338a57e0de3e6402c to your computer and use it in GitHub Desktop.
Save teivah/e70fe5f64afe388338a57e0de3e6402c to your computer and use it in GitHub Desktop.
withMonad :: Int -> String -> Maybe String
withMonad age name = do
validateAge age
s <- return (greet name)
return (greet s) -- Just "Hello Hello John"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment