template Foo(B(A) foo, A, B) { }
alias f = Foo!((int x) => x % 2 == 0);That would instantiate Foo with B == bool, A == int and foo bound to the lambda.
The compiler has rejected all syntax variations I have tried and the specs is not helpful. Does anybody know if the feature exists and what is the syntax exactly?