<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>trotr</author_name>
  <author_url>https://blog.hatena.ne.jp/trotr/</author_url>
  <blog_title>trotrの日記</blog_title>
  <blog_url>https://trotr.hatenadiary.org/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>以下のようなハッシュを作ることで、pascalの3角形の値が計算できる。 pascal = Hash.new do |h,n| if n &lt;= 1 h[n] = [1] else h[n] = [0,*h[n-1]].zip([h[n-1],0].flatten).map{ |x,y| x + y} end end #require 'benchmark' #Benchmark.bmbm do |x| # n = 100 # x.report(&quot;hash&quot;){n.times{ |i| pascal[i]} } #end # &gt;&gt; Rehearsal ----------------------…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftrotr.hatenadiary.org%2Fentry%2F20080523%2F1211556292&quot; title=&quot;単純なメモ化ならhashを使ってもいいのかもしれない - trotrの日記&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-05-23 00:24:52</published>
  <title>単純なメモ化ならhashを使ってもいいのかもしれない</title>
  <type>rich</type>
  <url>https://trotr.hatenadiary.org/entry/20080523/1211556292</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
