{"type":"rich","width":"100%","image_url":null,"title":"Scala\u3067\u306eY Combinator","blog_url":"https://www.sakatakoichi.com/","height":"190","provider_url":"https://hatena.blog","categories":["programming"],"author_name":"jyukutyo","version":"1.0","published":"2008-10-21 08:21:27","description":"case class B[F,T](c: B[F, T] => (F => T)) extends (B[F, T] => (F => T)) { def apply(b: B[F, T]) = c(b); } def Y[F, T] = (f: (F => T) => F => T) => B[F, T](x => f(x(x)(_)))(B(x => f(x(x)(_)))) val factorial = Y[Int, Int](f => i => if (i <= 0) 1 else f(i - 1) * i) factorial(6) == 720 Scala\u3067Y Combinato\u2026","provider_name":"Hatena Blog","url":"https://www.sakatakoichi.com/entry/20081020/1224487287","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.sakatakoichi.com%2Fentry%2F20081020%2F1224487287\" title=\"Scala\u3067\u306eY Combinator - 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","author_url":"https://blog.hatena.ne.jp/jyukutyo/"}