Skip to content

Instantly share code, notes, and snippets.

@kkismd
Last active February 24, 2016 07:27
Show Gist options
  • Save kkismd/6c5424a10ab6e6e19c81 to your computer and use it in GitHub Desktop.
Save kkismd/6c5424a10ab6e6e19c81 to your computer and use it in GitHub Desktop.

T => T という型の関数 f, g, h があるとき

(f, g) を受け取って x => f(g(x)) となる関数を返す関数 Aと

(f, g, h) を受け取って x => f(g(h(x))) となる関数を返す関数 Bを考える

[1] AとBを実装せよ

[2] AとBを一般化して、 任意の数の T => T 型の関数のリスト [f, g, h, ... ] を受け取って

x => f( g( h( ... (x) ... ) ) )

となるような関数を返す関数 C を実装せよ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment