<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>obelisk2</author_name>
  <author_url>https://blog.hatena.ne.jp/obelisk2/</author_url>
  <blog_title>Camera Obscura</blog_title>
  <blog_url>https://obelisk.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>qiita.com元ネタはこれです。 Ruby のハッシュにはこのようなデフォルトの与え方があります。 h = Hash.new {|hash, key| hash[key] = default} これを利用して、こんな風にフィボナッチ数列をメモ化で計算できます。 fib = Hash.new do |hash, n| hash[n] = if n == 0 or n == 1 n else hash[n - 1] + hash[n - 2] end end fib[100] #=&gt;354224848179261915075 おお、すばらしい…。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2019%2F04%2F24%2F134024&quot; title=&quot;ハッシュによる美しいメモ化（Ruby） - Camera Obscura&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>2019-04-24 13:40:24</published>
  <title>ハッシュによる美しいメモ化（Ruby）</title>
  <type>rich</type>
  <url>https://obelisk.hatenablog.com/entry/2019/04/24/134024</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
