5.4.2 Predicates for managing dicts
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • SWI-Prolog extensions
        • Dicts: structures with named arguments
          • Predicates for managing dicts
            • is_dict/1
            • is_dict/2
            • get_dict/3
            • get_dict/5
            • dict_create/3
            • dict_pairs/3
            • dict_same_keys/2
            • put_dict/3
            • put_dict/4
            • del_dict/4
            • :</2
            • select_dict/3
            • >:</2
            • Destructive assignment in dicts
    • Packages
Availability:built-in
dict_same_keys(?Dict1, ?Dict2)
True when Dict1 and Dict2 have the same set of keys. The tag is not considered. This predicate is semidet if both arguments are instantiated to a dict. If one is instantiated to a dict and the other is unbound, it generates a dict with the same keys and unbound tag and values. The predicate is_dict/2 may be used test tag equivalence or unify the tags. This predicate raises an instantiation_error if both argument are unbound or a type_error if one of the arguments is neither a dict nor a variable.