<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rubyco</author_name>
  <author_url>https://blog.hatena.ne.jp/rubyco/</author_url>
  <blog_title>rubyco（るびこ）の日記</blog_title>
  <blog_url>https://rubyco.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>昨日の続きで、仮想的な無限列を作っております。とりあえず、こんなのできましたというご紹介を。 Sequenceクラスは、初期値が与えられれば無限列を作るひながたを表すクラスです。 そしてSequence#defineで初期値を与えると実際の無限列が作られます。 無限列は実際にはProcのインスタンスで、具体的な数列を得たかったら、x, xs = xs.call()を繰り返します。(to_s参照) これらのクラスには、インスタンス変数が一個もなく、変数への再代入もなく、再帰以外のループもありません。 (あとは、dropやzipの再帰呼び出しで名前を消せればよいんですね＜なにがよいのかよくわからな…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubyco.hatenadiary.org%2Fentry%2F20060420%2Fsequence&quot; title=&quot;仮想的な無限列(2) - rubyco（るびこ）の日記&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>2006-04-20 00:00:00</published>
  <title>仮想的な無限列(2)</title>
  <type>rich</type>
  <url>https://rubyco.hatenadiary.org/entry/20060420/sequence</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
