Last active
August 29, 2015 14:17
-
-
Save alphaKAI/28ca522aa3abcc6c56c9 to your computer and use it in GitHub Desktop.
D言語で部分適用してみた
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import std.stdio; | |
| void func(int x, int y, int z){ | |
| writeln("function"); | |
| writeln("x, y, z : ", x, ",", y, ",", z); | |
| } | |
| void main(){ | |
| auto fxy = ((int x) => (int y) => func(1, x, y)); | |
| auto fx = fxy(2); | |
| fx(3); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment