return new Cons.RecursiveVisitor(nullValue) {
@Override
protected TypedValue processValue(TypedValue head, TypedValue tail) {
final TypedValue result = executeUnaryCallable(frame, predicate, slotCall, head);
boolean shouldDrop = MetaObjectUtils.boolValue(frame, result);
<BUG>Preconditions.checkState(stack.isEmpty(), "Values left on stack");
return shouldDrop? process(tail) : Cons.create(domain, head, tail);</BUG>
}
}.process(list);
}

return new Cons.RecursiveVisitor(nullValue) {
@Override
protected TypedValue processValue(TypedValue head, TypedValue tail) {
final TypedValue result = executeUnaryCallable(frame, functor, slotCall, head);
stack.checkIsEmpty();
return Cons.create(domain, result, process(tail));
}
}.process(list);
}
