<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>subaru-hello</author_name>
  <author_url>https://blog.hatena.ne.jp/subaru-hello/</author_url>
  <blog_title>subaru-hello’s blog</blog_title>
  <blog_url>https://subaru-hello.hateblo.jp/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>クロージャ 関数が内包するスコープを保持する性質 rubyのような手続型プログラミングにも、関数型プログラミングのような記法が存在する。 いわゆるブロックがrubyでいうクロージャに当たる。 rubyでは、do endや{}で囲まれた、メソッドのような手続きをブロックで表現する書き方が存在している。 ブロックはそれ単独ではメモリ上に存在することができない。 そのため、ブロックをメモリ上に残しておきたい場合は、Procという手続きオブジェクトを使用する必要がある。 ブロックは、外側で定義されたローカル変数を参照できるという性質を持っていて、Proc.newの引数に渡すことでメモリ上に残ることがで…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsubaru-hello.hateblo.jp%2Fentry%2F2022%2F09%2F30%2F085606&quot; title=&quot;クロージャ・to_proc - subaru-hello’s blog&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>2022-09-30 08:56:06</published>
  <title>クロージャ・to_proc</title>
  <type>rich</type>
  <url>https://subaru-hello.hateblo.jp/entry/2022/09/30/085606</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
