Class SetOf

  • All Implemented Interfaces:
    KnowledgeBaseConsumer, PredicateFactory, PreprocessablePredicateFactory

    public final class SetOf
    extends AbstractPredicateFactory
    implements PreprocessablePredicateFactory
    setof(X,P,L) - find all solutions that satisfy the goal.

    setof(X,P,L) produces a list (L) of X for each possible solution of the goal P. If P contains uninstantiated variables, other than X, it is possible that setof can be successfully evaluated multiple times - for each possible values of the uninstantiated variables. The elements in L will appear in sorted order and will not include duplicates. Fails if P has no solutions.