bearophile wrote:
tama:
void foo(alias f)()
{
writefln(f(3, 4));
}
foo!((x,y){ return x * y; })();
This code doesn't work(compile error).
To me the following works:
import std.stdio: writeln;
void foo(alias f)() {
writeln(f(3, 4));
}
void main() {
foo!((x,y){ return x * y; })();
}
I see.
I tested following code.
writefln(3 * 4);
This code doesn't work in the first place:-<
Sorry, it didn't matter.
--
tama <repeate...@gmail.com>
http://profile.livedoor.com/repeatedly/
メンバー募集中
http://tpf.techtalk.jp/