{"version":"1.0","provider_url":"https://hatena.blog","categories":["programming"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.sakatakoichi.com%2Fentry%2F20081105%2F1225848160\" title=\"\u30e2\u30ca\u30c9\u306b\u3064\u3044\u3066\u8abf\u3079\u3066\u3044\u304f(5) - Fight the Future\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"Fight the Future","blog_url":"https://www.sakatakoichi.com/","url":"https://www.sakatakoichi.com/entry/20081105/1225848160","image_url":null,"type":"rich","height":"190","author_url":"https://blog.hatena.ne.jp/jyukutyo/","published":"2008-11-06 03:22:40","provider_name":"Hatena Blog","title":"\u30e2\u30ca\u30c9\u306b\u3064\u3044\u3066\u8abf\u3079\u3066\u3044\u304f(5)","description":"Monads in Scala\u3092\u524d\u56de\u306b\u5f15\u304d\u7d9a\u304d\u7ffb\u8a33\u3002 \u307b\u3093\u306e\u5c11\u3057\u3060\u3051\u3069\u7406\u89e3\u304c\u6df1\u307e\u3063\u3066\u308b\u611f\u3058\u3002 Scala's for comprehensions(Scala\u3067\u306e\u5185\u5305\u8868\u8a18) \"do-notation\" is a syntax to write monad based program fragments: \u300cdo\u8868\u8a18\u6cd5\u300d\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u65ad\u7247\u3092\u57fa\u790e\u3068\u3059\u308b\u30e2\u30ca\u30c9\u3092\u8a18\u8ff0\u3059\u308b\u305f\u3081\u306e\u30b7\u30f3\u30bf\u30c3\u30af\u30b9\u3067\u3059\u3002 do x <- m1 y <- m2 return (x + y)In Scala, this would look like this: Scala\u3067\u306f\u3001\u3053\u308c\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308b\u3002 for(val x <- m\u2026","author_name":"jyukutyo","width":"100%"}