A.26 library(nb_set): Non-backtrackable set
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(nb_set): Non-backtrackable set
          • empty_nb_set/1
          • add_nb_set/2
          • add_nb_set/3
          • gen_nb_set/2
          • size_nb_set/2
          • nb_set_to_list/2
    • Packages
Availability::- use_module(library(nb_set)).(can be autoloaded)
Sourceadd_nb_set(+Key, !Set, ?New)
If Key is not in Set and New is unified to true, Key is added to Set. If Key is in Set, New is unified to false. It can be used for many purposes:

add_nb_set(+, +, false)Test membership
add_nb_set(+, +, true)Succeed only if new member
add_nb_set(+, +, Var)Succeed, binding Var