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

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl
      • lists.pl -- List Manipulation
      • broadcast.pl
      • shlib.pl -- Utility library for loading foreign objects (DLLs, shared objects)
      • option.pl
      • thread_pool.pl
      • gensym.pl
      • settings.pl -- Setting management
      • arithmetic.pl
      • main.pl -- Provide entry point for scripts
      • readutil.pl -- Read utilities
      • operators.pl
      • pairs.pl
      • prolog_source.pl
      • record.pl -- Access compound arguments by name
      • quasi_quotations.pl
      • pure_input.pl
      • solution_sequences.pl
      • ordsets.pl -- Ordered set manipulation
        • is_ordset/1
        • ord_empty/1
        • ord_seteq/2
        • list_to_ord_set/2
        • ord_intersect/2
        • ord_disjoint/2
        • ord_intersect/3
        • ord_intersection/2
        • ord_intersection/3
        • ord_intersection/4
        • ord_add_element/3
        • ord_del_element/3
        • ord_selectchk/3
        • ord_memberchk/2
        • ord_subset/2
        • ord_subtract/3
        • ord_union/2
        • ord_union/3
        • ord_union/4
        • ord_symdiff/3
      • random.pl
      • base64.pl
      • aggregate.pl -- Aggregation operators on backtrackable predicates
      • yall.pl -- Lambda expressions
      • sandbox.pl
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • assoc.pl -- Binary associations
      • prolog_format.pl
      • predicate_options.pl
      • csv.pl -- Process CSV (Comma-Separated Values) data
      • pprint.pl -- Pretty Print Prolog terms
      • atom.pl
      • modules.pl -- Module utility predicates
      • occurs.pl
      • prolog_xref.pl -- Prolog cross-referencer data collection
      • prolog_colour.pl
      • lazy_lists.pl
      • ugraphs.pl
      • url.pl
      • www_browser.pl
      • prolog_pack.pl
      • git.pl -- Run GIT commands
      • rbtrees.pl -- Red black trees
      • dif.pl
      • charsio.pl
      • prolog_stack.pl -- Examine the Prolog stack
      • edinburgh.pl -- Some traditional Edinburgh predicates
      • prolog_clause.pl
      • prolog_breakpoints.pl
      • wfs.pl
      • dialect.pl
      • prolog_code.pl
      • sort.pl
      • iostream.pl -- Utilities to deal with streams
      • dicts.pl
      • varnumbers.pl
      • base32.pl
      • codesio.pl -- I/O on Lists of Character Codes
      • coinduction.pl
      • date.pl
      • heaps.pl
      • statistics.pl -- Get information about resource usage
      • terms.pl
      • utf8.pl
      • when.pl -- Conditional coroutining
      • backcomp.pl
      • optparse.pl
      • strings.pl -- String utilities
      • listing.pl -- List programs and pretty print clauses
      • tables.pl
      • thread.pl -- High level thread primitives
      • prolog_coverage.pl
      • edit.pl
      • ansi_term.pl -- Print decorated text to ANSI consoles
      • prolog_config.pl
      • intercept.pl
      • system.pl -- System utilities
      • portray_text.pl
      • shell.pl -- Elementary shell commands
      • explain.pl
      • prolog_trace.pl
      • prolog_wrap.pl
      • make.pl -- Reload modified source files
      • writef.pl
      • persistency.pl
      • quintus.pl
      • prolog_debug.pl -- User level debugging tools
      • threadutil.pl -- Interactive thread utilities
      • rwlocks.pl
      • exceptions.pl
      • help.pl -- Text based manual
      • check.pl
      • nb_set.pl
      • prolog_jiti.pl
      • qsave.pl
      • zip.pl
      • prolog_autoload.pl
      • files.pl
      • streams.pl -- Manage Prolog streams
      • prolog_profile.pl
      • oset.pl
      • prolog_codewalk.pl -- Prolog code walker
      • hashtable.pl
      • macros.pl
      • increval.pl
      • prolog_metainference.pl
      • fastrw.pl
      • ctypes.pl
      • prolog_versions.pl
 ord_symdiff(+Set1, +Set2, ?Difference) is det
Is true when Difference is the symmetric difference of Set1 and Set2. I.e., Difference contains all elements that are not in the intersection of Set1 and Set2. The semantics is the same as the sequence below (but the actual implementation requires only a single scan).
      ord_union(Set1, Set2, Union),
      ord_intersection(Set1, Set2, Intersection),
      ord_subtract(Union, Intersection, Difference).

For example:

?- ord_symdiff([1,2], [2,3], X).
X = [1,3].