<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>morchin</author_name>
  <author_url>https://blog.hatena.ne.jp/morchin/</author_url>
  <blog_title>プログラミング日記</blog_title>
  <blog_url>https://morchin.hatenadiary.org/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>PythonでRubyのようにコードブロックを渡すやり方。デコレータを利用する。 &gt;&gt;&gt; def each(L): ... def each_(func): ... for x in L: ... func(x) ... return each_ ... &gt;&gt;&gt; L = range(10) &gt;&gt;&gt; &gt;&gt;&gt; @each(L) ... def pr(x): ... print '&lt;', x, '&gt;' ... &lt; 0 &gt; &lt; 1 &gt; &lt; 2 &gt; &lt; 3 &gt; &lt; 4 &gt; &lt; 5 &gt; &lt; 6 &gt; &lt; 7 &gt; &lt; 8 &gt; &lt; 9 &gt; &gt;&gt;&gt; &gt;&gt;&gt; def map(L): ... L2 = [] ... …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmorchin.hatenadiary.org%2Fentry%2F20080911%2Fp1&quot; title=&quot; 関数にコードブロックを渡す - プログラミング日記&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>2008-09-11 00:00:00</published>
  <title> 関数にコードブロックを渡す</title>
  <type>rich</type>
  <url>https://morchin.hatenadiary.org/entry/20080911/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
