• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

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
[semidet]select_dict(+Select, +From, -Rest)
True when the tags of Select and From have been unified, all keys in Select appear in From and the corresponding values have been unified. The key-value pairs of From that do not appear in Select are used to form an anonymous dict, which is unified with Rest. For example:
?- select_dict(P{x:0, y:Y}, point{x:0, y:1, z:2}, R).
P = point,
Y = 1,
R = _{z:2}.

See also :</2 to ignore Rest and >:</2 for a symmetric partial unification of two dicts.

ClioPatria (version V3.1.1-51-ga0b30a5)