<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>siokoshou</author_name>
  <author_url>https://blog.hatena.ne.jp/siokoshou/</author_url>
  <blog_title>当面C#と.NETな記録</blog_title>
  <blog_url>https://siokoshou.hatenadiary.org/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>Composit パターンを使った木構造にイテレータを書こうとして、ふと yield で再帰ってどうやるんだ？とちょっと考え込んでしまったのでメモ。わかってしまえば、あーこれ再帰だよねぇと納得ですが、パッと見、再帰に見えない罠。 せっかくなのでファイル/ディレクトリ用のイテレータを書いてみました。LINQ のエサにどうぞ。ちなみに、C#の言語仕様書にもサンプルが載ってます。あと、Head Firstデザインパターン ―頭とからだで覚えるデザインパターンの基本 にもズバリそのものが出てます。ちょっと横道にそれるけど「Head Firstデザインパターン」は今年読んだ本で一番でした。今年は図書館に…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsiokoshou.hatenadiary.org%2Fentry%2F20071227%2Fp1&quot; title=&quot; yield 再帰 - 当面C#と.NETな記録&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-12-27 00:00:00</published>
  <title> yield 再帰</title>
  <type>rich</type>
  <url>https://siokoshou.hatenadiary.org/entry/20071227/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
