Skip to content

Instantly share code, notes, and snippets.

@igrep
Created April 13, 2021 02:49
Show Gist options
  • Save igrep/31c2a665782568eb731c5f1c1a1edec3 to your computer and use it in GitHub Desktop.
Save igrep/31c2a665782568eb731c5f1c1a1edec3 to your computer and use it in GitHub Desktop.
do記法の中でletやlet ... inを使ったサンプル
main = do
-- let ... in を使った場合
let f :: String -> IO ()
f = putStrLn
in f "f"
-- ただの let を使った場合(こっちの方が大抵おすすめ!)
let g :: String -> IO ()
g = putStrLn
g "g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment