<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>xyuyux</author_name>
  <author_url>https://blog.hatena.ne.jp/xyuyux/</author_url>
  <blog_title>xyuyuxの日記</blog_title>
  <blog_url>https://xyuyux.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>まずは普通に関数定義するとこんなんですよね？ def g(x) end def f(y) end def foo(x) f(g(x)) end foo関数をポイントフリーにしてみます。 まずは、関数合成 def foo(x) (method(:f) &lt;&lt; method(:g).(x) #もしくは -&gt;x { f (g x) } end 合成したので(method(:f) あとは(x)を消すだけです。 def foo (method(:f) &lt;&lt; method(:g) end fooから引数である(x)が消えた！！？ これだけです。(誰得 まぁ呼び元で foo.(1) #もしくは foo[1] …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxyuyux.hatenadiary.org%2Fentry%2F20120907%2F1347005470&quot; title=&quot;Rubyでポイントフリー - xyuyuxの日記&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>2012-09-07 17:11:10</published>
  <title>Rubyでポイントフリー</title>
  <type>rich</type>
  <url>https://xyuyux.hatenadiary.org/entry/20120907/1347005470</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
