- aggregate_all(+Template, +Discriminator, :Goal, -Result) is semidet
- Aggregate bindings in Goal according to Template. The
aggregate_all/4 version performs findall/3 followed by sort/2 on
Goal. See aggregate_all/3 to understand why this predicate can
fail.