{"width":"100%","author_url":"https://blog.hatena.ne.jp/licheng/","version":"1.0","height":"190","published":"2024-04-14 18:44:34","blog_url":"https://lipoyang.hatenablog.com/","author_name":"licheng","title":"Haskell\u306e\u30e2\u30ca\u30c9\u3044\u308d\u3044\u308d (2)","blog_title":"\u6ef4\u4e86\u5eb5\u65e5\u9332","url":"https://lipoyang.hatenablog.com/entry/2024/04/14/184434","description":"IO\u30e2\u30ca\u30c9 ST\u30e2\u30ca\u30c9 IO\u30e2\u30ca\u30c9 IO\u306f\u3082\u3061\u308d\u3093\u30e2\u30ca\u30c9\u3067\u3042\u308b\u3002 \u5165\u51fa\u529b\u3068\u3044\u3046\u526f\u4f5c\u7528\u3092\u6271\u3046\u305f\u3081\u306b\u7528\u3044\u3089\u308c\u308b\u3002 main \u3082 IO () \u3068\u3044\u3046\u578b\u306e\u5909\u6570\u3067\u3042\u308b\u3002 (\u95a2\u6570\u3067\u306f\u306a\u3044)\u30e2\u30ca\u30c9\u3060\u304b\u3089 return \u3067\u5024\u3092\u4e2d\u306b\u5165\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002 hoge::Int -> IO Int hoge x = return x main :: IO () main = do let ma = hoge 5 a <- ma print a -- 5 \u30e2\u30ca\u30c9\u3060\u304b\u3089 join \u3067\u4e00\u76ae\u3080\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u304c\u3001 join \u3067\u88f8\u306b\u306f\u3067\u304d\u306a\u3044\u3002 import Control.Monad main = do let ma = re\u2026","categories":["\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0"],"type":"rich","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Flipoyang.hatenablog.com%2Fentry%2F2024%2F04%2F14%2F184434\" title=\"Haskell\u306e\u30e2\u30ca\u30c9\u3044\u308d\u3044\u308d (2) - \u6ef4\u4e86\u5eb5\u65e5\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}