Here is an example:
int[] arr = [ 1, 2, 3, 4, 5 ];
auto foo = filter!("a < 3")(arr);
assert(foo == [ 1, 2 ]); // works fine
Now I want to be able to parameterize the predicate, e.g.
int max = 3;
int[] arr = [ 1, 2, 3, 4, 5 ];
auto foo = filter!("a < max")(arr); // doesn't compile
This snippet won't compile obviously, sine the filter!()'s predicate only accepts one parameter. Is there a way to overcome this limitation without resorting to the good ol' for/foreach loop?