static L filter(Iterable c, O pred) {
if (pred instanceof F1) ret filter(c, (F1) pred);
ifdef filter_debug
print("Slow filter called");
endifdef
new L x;
if (c != null) for (O o : c)
if (isTrue(callF(pred, o)))
x.add(o);
ret x;
}
static L filter(O pred, Iterable c) {
ret filter(c, pred);
}
static L filter(Iterable c, F1 pred) {
new L x;
if (c != null) for (B o : c)
if (pred.get(o))
x.add(o);
ret x;
}
static L filter(F1 pred, Iterable c) {
ret filter(c, pred);
}
//ifclass IF1
static L filter(Iterable c, IF1 pred) {
new L x;
if (c != null) for (B o : c)
if (pred.get(o))
x.add(o);
ret x;
}
static L filter(B[] c, IF1 pred) {
new L x;
if (c != null) for (B o : c)
if (pred.get(o))
x.add(o);
ret x;
}
static L lambdaMapLike filter(IF1 pred, Iterable c) {
ret filter(c, pred);
}
//endif