A.31 library(ordsets): Ordered set manipulation
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(ordsets): 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
    • Packages
Availability::- use_module(library(ordsets)).(can be autoloaded)
Source[semidet]ord_memberchk(+Element, +OrdSet)
True if Element is a member of OrdSet, compared using ==. Note that enumerating elements of an ordered set can be done using member/2.

Some Prolog implementations also provide ord_member/2, with the same semantics as ord_memberchk/2. We believe that having a semidet ord_member/2 is unacceptably inconsistent with the *_chk convention. Portable code should use ord_memberchk/2 or member/2.

author
Richard O'Keefe