I made the following enumerations to test the predicates.
private enum bool isUnaryPredicate(alias pred, Range) = is(typeof(unaryFun!(pred)((ElementType!Range).init)) == bool); private enum bool isBinaryPredicate(alias pred, Range, V) = is(typeof(binaryFun!(pred)((ElementType!Range).init, V.init)) == bool);
Both work as expected. Thank you.