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

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl -- Apply predicates on a list
      • 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 -- Ordered set manipulation
      • random.pl
      • base64.pl
      • aggregate.pl
      • 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 -- Module utility predicates
      • occurs.pl
      • prolog_xref.pl
      • prolog_colour.pl
      • lazy_lists.pl
      • ugraphs.pl
      • url.pl -- Analysing and constructing URL
      • www_browser.pl -- Open a URL in the users browser
      • prolog_pack.pl
      • git.pl
      • utf8.pl -- UTF-8 encoding/decoding on lists of character codes.
      • dialect.pl -- Support multiple Prolog dialects
      • 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
      • wfs.pl
      • prolog_code.pl
      • sort.pl
      • dicts.pl
      • dif.pl -- The dif/2 constraint
      • varnumbers.pl -- Utilities for numbered terms
      • pio.pl
      • hashtable.pl
      • optparse.pl
      • base32.pl
      • charsio.pl
      • codesio.pl
      • coinduction.pl
      • heaps.pl
      • rbtrees.pl
      • statistics.pl -- Get information about resource usage
      • when.pl
      • backcomp.pl
      • prolog_profile.pl
      • ctypes.pl -- Character code classification
      • tables.pl
      • prolog_debug.pl
      • ansi_term.pl -- Print decorated text to ANSI consoles
      • make.pl
      • strings.pl
      • threadutil.pl -- Interactive thread utilities
      • quintus.pl
      • thread.pl
      • explain.pl
      • qsave.pl
      • zip.pl
      • prolog_autoload.pl
      • check.pl -- Consistency checking
      • shell.pl -- Elementary shell commands
      • prolog_coverage.pl
      • prolog_codewalk.pl -- Prolog code walker
      • files.pl
      • nb_set.pl -- Non-backtrackable sets
        • empty_nb_set/1
        • add_nb_set/2
        • add_nb_set/3
        • nb_set_to_list/2
        • gen_nb_set/2
        • size_nb_set/2
      • writef.pl
      • rwlocks.pl
      • increval.pl
      • prolog_versions.pl -- Demand specific (Prolog) versions
      • exceptions.pl
      • prolog_metainference.pl
 add_nb_set(+Key, !Set) is det
 add_nb_set(+Key, !Set, ?New) is semidet
Insert Key into the set. If a variant (see =@=/2) of Key is already in the set, the set is unchanged and New is unified with false. Otherwise, New is unified with true and a copy of Key is added to the set.
To be done
- Computing the hash for cyclic terms is performed with the help of term_factorized/3, which performs rather poorly.