Skip to content

Instantly share code, notes, and snippets.

@alphaKAI
Last active August 29, 2015 14:17
Show Gist options
  • Select an option

  • Save alphaKAI/28ca522aa3abcc6c56c9 to your computer and use it in GitHub Desktop.

Select an option

Save alphaKAI/28ca522aa3abcc6c56c9 to your computer and use it in GitHub Desktop.
D言語で部分適用してみた
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