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

  • swipl
    • library
      • error.pl
      • debug.pl -- Print debug messages and test assertions
      • apply.pl -- Apply predicates on a list
      • lists.pl -- List Manipulation
      • broadcast.pl
      • shlib.pl -- Utility library for loading foreign objects (DLLs, shared objects)
      • option.pl -- Option list processing
      • thread_pool.pl -- Resource bounded thread management
      • gensym.pl
      • settings.pl
      • arithmetic.pl -- Extensible arithmetic
      • main.pl -- Provide entry point for scripts
      • readutil.pl -- Read utilities
      • operators.pl -- Manage operators
      • pairs.pl -- Operations on key-value lists
      • prolog_source.pl -- Examine Prolog source-files
      • record.pl -- Access compound arguments by name
      • quasi_quotations.pl -- Define Quasi Quotation syntax
      • pure_input.pl -- Pure Input from files and streams
      • solution_sequences.pl -- Modify solution sequences
      • ordsets.pl -- Ordered set manipulation
      • random.pl -- Random numbers
      • base64.pl
      • aggregate.pl
      • yall.pl -- Lambda expressions
      • sandbox.pl
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • assoc.pl -- Binary associations
      • prolog_format.pl -- Analyse format specifications
      • predicate_options.pl -- Access and analyse predicate options
      • csv.pl
      • pprint.pl -- Pretty Print Prolog terms
      • atom.pl -- Operations on atoms
      • modules.pl
      • occurs.pl -- Finding and counting sub-terms
      • prolog_xref.pl
      • prolog_colour.pl -- Prolog syntax colouring support.
      • lazy_lists.pl -- Lazy list handling
      • ugraphs.pl -- Graph manipulation library
      • url.pl -- Analysing and constructing URL
      • www_browser.pl -- Open a URL in the users browser
      • prolog_pack.pl -- A package manager for Prolog
      • git.pl
      • rbtrees.pl -- Red black trees
      • dif.pl -- The dif/2 constraint
      • charsio.pl -- I/O on Lists of Character Codes
      • prolog_stack.pl -- Examine the Prolog stack
      • edinburgh.pl
      • prolog_clause.pl
      • prolog_breakpoints.pl
      • wfs.pl
      • dialect.pl -- Support multiple Prolog dialects
      • prolog_code.pl -- Utilities for reasoning about code
      • sort.pl
      • iostream.pl -- Utilities to deal with streams
      • dicts.pl -- Dict utilities
      • varnumbers.pl -- Utilities for numbered terms
      • backcomp.pl -- Backward compatibility
      • prolog_jiti.pl
      • ansi_term.pl -- Print decorated text to ANSI consoles
      • listing.pl -- List programs and pretty print clauses
      • prolog_metainference.pl -- Infer meta-predicate properties
      • base32.pl -- Base32 encoding and decoding
      • codesio.pl -- I/O on Lists of Character Codes
      • coinduction.pl -- Co-Logic Programming
      • date.pl -- Process dates and times
      • heaps.pl -- heaps/priority queues
      • statistics.pl -- Get information about resource usage
      • terms.pl -- Term manipulation
        • term_size/2
        • variant/2
        • subsumes_chk/2
        • subsumes/2
        • term_subsumer/3
        • term_factorized/3
        • mapargs/3
        • mapsubterms/3
        • mapsubterms_var/3
        • foldsubterms/4
        • foldsubterms/5
        • same_functor/2
        • same_functor/3
        • same_functor/4
      • utf8.pl -- UTF-8 encoding/decoding on lists of character codes.
      • when.pl -- Conditional coroutining
      • explain.pl
      • streams.pl -- Manage Prolog streams
      • prolog_trace.pl
      • thread.pl -- High level thread primitives
      • edit.pl -- Editor interface
      • optparse.pl
      • strings.pl -- String utilities
      • ctypes.pl -- Character code classification
      • threadutil.pl -- Interactive thread utilities
      • quintus.pl -- Quintus compatibility
      • prolog_profile.pl
      • prolog_coverage.pl -- Coverage analysis tool
      • increval.pl -- Incremental dynamic predicate modification
      • tables.pl -- XSB interface to tables
      • portray_text.pl
      • persistency.pl -- Provide persistent dynamic predicates
      • prolog_wrap.pl -- Wrapping predicates
      • help.pl -- Text based manual
      • prolog_autoload.pl
      • check.pl -- Consistency checking
      • prolog_codewalk.pl -- Prolog code walker
      • system.pl
      • intercept.pl -- Intercept and signal interface
      • writef.pl -- Old-style formatted write
      • oset.pl
      • exceptions.pl -- Exception classification
      • shell.pl
      • zip.pl
      • qsave.pl -- Save current program as a state or executable
      • prolog_debug.pl -- User level debugging tools
      • make.pl -- Reload modified source files
      • prolog_versions.pl -- Demand specific (Prolog) versions
      • macros.pl
      • fastrw.pl
      • nb_set.pl
      • files.pl
      • hashtable.pl
 foldsubterms(:Goal3, +Term1, +State0, -State) is semidet
 foldsubterms(:Goal4, +Term1, ?Term2, +State0, -State) is semidet
The predicate foldsubterms/5 calls call(Goal4, SubTerm1, SubTerm2, StateIn, StateOut) for each subterm, including variables, in Term1. If this call fails, StateIn and StateOut are the same. This predicate may be used to map subterms in a term while collecting state about the mapped subterms. The foldsubterms/4 variant does not map the term.