<?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>
  </categories>
  <description>Haskellでは関数の部分適用とか関数の合成ができますが、その仕組みをKotlinでも再現しようという実験、という名の遊びです。 案外うまくキレイに出来ました。 関数の部分適用 次のような拡張関数を用意して、実現しました。 fun &lt;X, Y, R&gt; Function2&lt;X, Y, R&gt;.invoke(x : X) = { (y : Y) -&gt; this(x, y) } これがあれば、関数オブジェクトを部分適用することが出来ます。 fun main(args : Array&lt;String&gt;) { val plus = { (a : Int, b : Int) -&gt; a + b } print…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftaro.hatenablog.jp%2Fentry%2F2013%2F01%2F31%2F194146&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-01-31 19:41:46</published>
  <title>Kotlinで関数の合成と部分適用</title>
  <type>rich</type>
  <url>https://taro.hatenablog.jp/entry/2013/01/31/194146</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
