unfoldGoals

Flattens a (possibly nested) , /2 tuple of goals into the sequence of its leaves, depth-first.