Skip to content

Instantly share code, notes, and snippets.

@teivah
Last active March 16, 2024 14:30
Show Gist options
  • Select an option

  • Save teivah/d18d807dd10bcb9af63f866db67e5a23 to your computer and use it in GitHub Desktop.

Select an option

Save teivah/d18d807dd10bcb9af63f866db67e5a23 to your computer and use it in GitHub Desktop.

Revisions

  1. teivah revised this gist Mar 16, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion monad.hs
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,2 @@
    withMonad :: Int -> String -> Maybe String
    withMonad age name = validateAge age >>= \_ -> return $ greet name
    withMonad age name = validateAge age >>= \_ -> return (greet name)
  2. teivah created this gist Mar 16, 2024.
    2 changes: 2 additions & 0 deletions monad.hs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    withMonad :: Int -> String -> Maybe String
    withMonad age name = validateAge age >>= \_ -> return $ greet name