<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kurimura</author_name>
  <author_url>https://blog.hatena.ne.jp/kurimura/</author_url>
  <blog_title>kurimura’s diary</blog_title>
  <blog_url>https://kurimura.hateblo.jp/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>外部イテレータを使って内部イテレータは作れるけど、 内部イテレータを使って外部イテレータは作れない。 ...と今まで思ってたけど、普通に出来るな。どこでそう勘違いしてたんだろう俺？ class Iterator def initialize(it) cont = lambda do|ret| it.each do|x| ret = callcc do|cont| ret.call [cont,x] end end ret.call nil end @value = [cont,nil] end def current;@value[1];end def next;@value = callcc…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkurimura.hateblo.jp%2Fentry%2F20070303%2F1172879293&quot; title=&quot;イテレータ - kurimura’s diary&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>2007-03-03 08:48:13</published>
  <title>イテレータ</title>
  <type>rich</type>
  <url>https://kurimura.hateblo.jp/entry/20070303/1172879293</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
