• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

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

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl -- Apply predicates on a list
        • include/3
        • exclude/3
        • partition/4
        • partition/5
        • maplist/2
        • maplist/3
        • maplist/4
        • maplist/5
        • convlist/3
        • foldl/4
        • foldl/5
        • foldl/6
        • foldl/7
        • scanl/4
        • scanl/5
        • scanl/6
        • scanl/7
      • lists.pl
      • broadcast.pl
      • shlib.pl
      • option.pl
      • thread_pool.pl -- Resource bounded thread management
      • gensym.pl
      • settings.pl -- Setting management
      • arithmetic.pl
      • main.pl
      • readutil.pl
      • operators.pl -- Manage operators
      • pairs.pl -- Operations on key-value lists
      • prolog_source.pl
      • quasi_quotations.pl
      • url.pl
      • www_browser.pl -- Open a URL in the users browser
      • prolog_colour.pl
      • record.pl
      • prolog_xref.pl
      • occurs.pl
      • ordsets.pl -- Ordered set manipulation
      • assoc.pl -- Binary associations
      • ugraphs.pl
      • solution_sequences.pl
      • atom.pl
      • prolog_pack.pl -- A package manager for Prolog
      • git.pl
      • ctypes.pl
      • utf8.pl
      • base64.pl -- Base64 encoding and decoding
      • persistency.pl
      • pure_input.pl
      • nb_set.pl
      • aggregate.pl
      • csv.pl -- Process CSV (Comma-Separated Values) data
      • iostream.pl -- Utilities to deal with streams
      • dialect.pl
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • yall.pl -- Lambda expressions
      • prolog_code.pl -- Utilities for reasoning about code
      • dif.pl -- The dif/2 constraint
      • thread.pl -- High level thread primitives
      • predicate_options.pl
      • rbtrees.pl -- Red black trees
      • nb_rbtrees.pl
      • sandbox.pl
      • prolog_format.pl -- Analyse format specifications
      • random.pl
      • pprint.pl
      • modules.pl -- Module utility predicates
      • lazy_lists.pl -- Lazy list handling
      • edinburgh.pl
      • prolog_clause.pl
      • prolog_breakpoints.pl
      • dicts.pl
      • backcomp.pl -- Backward compatibility
      • date.pl
      • oset.pl
      • prolog_profile.pl
      • listing.pl
      • quintus.pl
      • optparse.pl
      • prolog_jiti.pl
      • make.pl
      • terms.pl -- Term manipulation
      • threadutil.pl -- Interactive thread utilities
      • varnumbers.pl -- Utilities for numbered terms
      • ansi_term.pl
      • zip.pl -- Access resource ZIP archives
      • tableutil.pl -- Table inspection and statistics utilities
      • charsio.pl
      • prolog_trace.pl -- Print access to predicates
      • shell.pl
      • hashtable.pl
      • prolog_stack.pl -- Examine the Prolog stack
      • strings.pl
      • heaps.pl
      • prolog_coverage.pl
      • system.pl
      • writef.pl
      • prolog_versions.pl
      • prolog_codewalk.pl
      • prolog_debug.pl -- User level debugging tools
      • statistics.pl
      • macros.pl
      • files.pl
      • coinduction.pl
      • edit.pl
      • check.pl
      • intercept.pl
      • prolog_config.pl
      • help.pl -- Text based manual
      • wfs.pl
      • qsave.pl -- Save current program as a state or executable
      • tables.pl
      • increval.pl
      • base32.pl
      • codesio.pl -- I/O on Lists of Character Codes
      • sort.pl
      • when.pl
      • prolog_autoload.pl
      • prolog_history.pl
      • streams.pl -- Manage Prolog streams
      • tty.pl
      • portray_text.pl -- Portray text
      • prolog_metainference.pl
      • prolog_wrap.pl -- Wrapping predicates
      • prolog_qlfmake.pl -- Compile the library to QLF format
      • explain.pl
 scanl(:Goal, ?List, +V0, -Values)
 scanl(:Goal, ?List1, ?List2, +V0, -Values)
 scanl(:Goal, ?List1, ?List2, ?List3, +V0, -Values)
 scanl(:Goal, ?List1, ?List2, ?List3, ?List4, +V0, -Values)
Scan an ensemble of m (0 <= m <= 4) lists of length n head-to-tail ("scan-left"), using columns of m list elements as arguments for Goal. The scanl family of predicates is defined as follows, with V0 an initial value and V the final value of the scanning operation:
scanl(G, [X_11, ..., X_1n],
         [X_21, ..., X_2n],
         ...,
         [X_m1, ..., X_mn], V0, [V0, V1, ..., Vn] ) :-
   call(G, X_11, ..., X_m1, V0, V1),
   call(G, X_12, ..., X_m2, V1, V2),
   ...
   call(G, X_1n, ..., X_mn, V<n-1>, Vn).

scanl behaves like a foldl that collects the sequence of values taken on by the Vx accumulator into a list.

ClioPatria (version V3.1.1-59-g7b9a7a3)