<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nbqx69</author_name>
  <author_url>https://blog.hatena.ne.jp/nbqx69/</author_url>
  <blog_title>ものすごいハイウエスト日記</blog_title>
  <blog_url>https://nbqx69.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>↑で「ループも関数で表現」とか書いたのですが、これをやるにはYコンビネータとそれを拡張させたZコンビネータというものが必要になってきます。詳しい話はものの本とかもっと詳しいサイトがあると思うのでそちらを参照していただくとして、ものすごく乱暴にいってしまうととりあえずは「終了条件を仕込ませた関数を返す関数を引数にとってループをつくる関数」といってもいいかもしれません。このYコンビネータとZコンビネータのGroovyクロージャでの表現を拝借させていただきます。Yコンビネータ def Y = {f-&gt;{x-&gt; f(x(x))}({x-&gt;f(x(x))})} Zコンビネータ def Z = {f-&gt; …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnbqx69.hatenadiary.org%2Fentry%2F20091217%2Fp2&quot; title=&quot;YコンビネータとZコンビネータという魔法 - ものすごいハイウエスト日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-12-17 00:00:01</published>
  <title>YコンビネータとZコンビネータという魔法</title>
  <type>rich</type>
  <url>https://nbqx69.hatenadiary.org/entry/20091217/p2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
