<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gom68</author_name>
  <author_url>https://blog.hatena.ne.jp/gom68/</author_url>
  <blog_title>gom68の日記</blog_title>
  <blog_url>https://gom.hatenablog.com/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>再び、λ楽しいよラムダの時間がやってまいりました。 true=λx.λy.x false=λx.λy.yそうすると、変数bがtrueかfalseをとるとしてb(0)(1)とすると、bがtrueのとき0、falseのとき1を返します。λで条件分岐ができた！ 2009-04-09 - きしだのはてな というわけで、λで条件分岐ができると聞いて、早速やってみた。 できれば、別関数を呼ばずにすませたい！ということで・・・ true/falseの代わりに関数を返すようにする 数字を比較した結果に応じて、値を返す。 #!/opt/local/bin/ruby1.9 class Fixnum @@tr = …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgom.hatenablog.com%2Fentry%2F20090414%2F1239717657&quot; title=&quot;ifもcaseも使わずに条件分岐 - gom68の日記&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>2009-04-14 23:00:57</published>
  <title>ifもcaseも使わずに条件分岐</title>
  <type>rich</type>
  <url>https://gom.hatenablog.com/entry/20090414/1239717657</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
