import std.functional;
int func(int x) { return x*2; }
alias compose!(func,func) twice;
void main()
{
assert( twice(1)==4 );
}

こんな感じだろうか?>>808