<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ngsw_taro</author_name>
  <author_url>https://blog.hatena.ne.jp/ngsw_taro/</author_url>
  <blog_title>算譜王におれはなる!!!!</blog_title>
  <blog_url>https://taro.hatenablog.jp/</blog_url>
  <categories>
    <anon>Kotlin</anon>
    <anon>プログラミング</anon>
  </categories>
  <description>Kotlin Advent Calendarの5日目。まだ空きだらけなので2回目やるよ。今日は以前少し書いた内容をもっと見て行こうと思う。 カリー化 Kotlinにおける関数オブジェクトをカリー化する。あたかも最初からカリー化されてるように見せるためにこんなコードを書く。 fun &lt;A, B, Result&gt; Function2&lt;A, B, Result&gt;.invoke(a: A) = { (b: B) -&gt; this(a, b) } 2引数関数に1引数のinvokeを拡張関数として定義。これがスコープにあるとき次のコードが期待通りに動く。 val f = minus(10) println(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftaro.hatenablog.jp%2Fentry%2F2013%2F12%2F05%2F212456&quot; title=&quot;Kotlinでカリー化と関数部分適用 - 算譜王におれはなる!!!!&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>2013-12-05 21:24:56</published>
  <title>Kotlinでカリー化と関数部分適用</title>
  <type>rich</type>
  <url>https://taro.hatenablog.jp/entry/2013/12/05/212456</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
