}
return;
}
RippleValue first = left.getFirst();
final StackMapping f = first.getMapping();
if (null == f) {
if (right.isNil()) {
//System.out.println("adding solution: " + left);
solutions.add(left);
return;
} else {
Closure c = new Closure(right.getFirst().getMapping(), first);
right = right.getRest();
left = left.getRest().push(new Operator(c));
}
} else {
if (0 == f.arity()) {
Collector<RippleList> results = new Collector<RippleList>();
// Note: synchronous evaluation is required
// Note: stack context is trivial
f.apply(left.getRest(), results, mc);
for (RippleList s : results) {
RippleList i = s;
RippleList cur = right;
while (!cur.isNil()) {
i = i.push(cur.getFirst());