Likealias fp1 = int function(int x); alias fp2 = int function(int x, int y);auto foo(T)(T f) { static if (is(T == fp2)) return f; else static if (is(T == fp1)) { return int function(int x, int y) => f(x); } else return 0; }?
This code doesn't compile for me. I have to adjust it to return function int(int x, int y) => f(x); and then it complains that it's a delegate.