/usr/local/lib/swipl/library/aggregate.pl
All Application Manual Name SummaryHelp

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl
      • lists.pl
      • broadcast.pl
      • shlib.pl
      • option.pl
      • thread_pool.pl
      • gensym.pl
      • settings.pl
      • arithmetic.pl
      • main.pl
      • readutil.pl
      • operators.pl
      • pairs.pl
      • prolog_source.pl
      • record.pl
      • quasi_quotations.pl
      • pure_input.pl
      • solution_sequences.pl
      • ordsets.pl
      • random.pl
      • base64.pl
      • aggregate.pl -- Aggregation operators on backtrackable predicates
        • safe_meta/2
        • aggregate/3
        • aggregate/4
        • aggregate_all/3
        • aggregate_all/4
        • foldall/4
        • foreach/2
        • free_variables/4
      • yall.pl
      • sandbox.pl -- Sandboxed Prolog code
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • assoc.pl
      • prolog_format.pl
      • predicate_options.pl
      • csv.pl
      • pprint.pl
      • atom.pl
      • modules.pl
      • occurs.pl -- Finding and counting sub-terms
      • prolog_xref.pl
      • prolog_colour.pl
      • lazy_lists.pl
      • ugraphs.pl
      • url.pl
      • www_browser.pl
      • prolog_pack.pl
      • git.pl
      • utf8.pl
      • dialect.pl
      • system.pl
      • terms.pl
      • date.pl
      • persistency.pl
      • iostream.pl -- Utilities to deal with streams
      • prolog_stack.pl -- Examine the Prolog stack
      • edinburgh.pl
      • prolog_clause.pl
      • prolog_breakpoints.pl -- Manage Prolog break-points
      • wfs.pl
      • prolog_code.pl
      • sort.pl
      • dicts.pl
      • dif.pl
      • varnumbers.pl
      • pio.pl
      • thread.pl
      • nb_set.pl
      • edit.pl
      • backcomp.pl
      • strings.pl
      • base32.pl
      • charsio.pl
      • codesio.pl
      • coinduction.pl -- Co-Logic Programming
      • heaps.pl
      • rbtrees.pl
      • statistics.pl
      • when.pl
      • increval.pl
      • tables.pl
      • threadutil.pl -- Interactive thread utilities
      • ansi_term.pl
      • hashtable.pl
      • macros.pl
      • intercept.pl
      • prolog_metainference.pl
      • prolog_codewalk.pl -- Prolog code walker
      • fastrw.pl
      • prolog_coverage.pl
      • prolog_debug.pl
      • prolog_profile.pl -- Execution profiler
      • check.pl
      • prolog_autoload.pl
      • ctypes.pl -- Character code classification
      • writef.pl
      • prolog_versions.pl
      • explain.pl
      • listing.pl -- List programs and pretty print clauses
      • zip.pl
      • tty.pl
 aggregate_all(+Template, :Goal, -Result) is semidet
Aggregate bindings in Goal according to Template. The aggregate_all/3 version performs findall/3 on Goal. Note that this predicate fails if Template contains one or more of min(X), max(X), min(X,Witness) or max(X,Witness) and Goal has no solutions, i.e., the minimum and maximum of an empty set is undefined.

The Template values count, sum(X), max(X), min(X), max(X,W) and min(X,W) are processed incrementally rather than using findall/3 and run in constant memory.

See also
- foldall/4 to "fold" over all answers.