• 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

A.4 library(assoc): Association lists
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(assoc): Association lists
          • Introduction
          • Creating association lists
          • Querying association lists
            • get_assoc/3
            • get_assoc/5
            • max_assoc/3
            • min_assoc/3
            • gen_assoc/3
          • Modifying association lists
          • Conversion predicates
          • Reasoning about association lists and their elements
    • Packages
h3 id="sec:assoc-querying">A.4.3 Querying association lists

An association list can be queried with:

[semidet]get_assoc(+Key, +Assoc, -Value)
True if Key-Value is an association in Assoc.
[semidet]get_assoc(+Key, +Assoc0, ?Val0, ?Assoc, ?Val)
True if Key-Val0 is in Assoc0 and Key-Val is in Assoc.
[semidet]max_assoc(+Assoc, -Key, -Value)
True if Key-Value is in Assoc and Key is the largest key.
[semidet]min_assoc(+Assoc, -Key, -Value)
True if Key-Value is in assoc and Key is the smallest key.
[nondet]gen_assoc(?Key, +Assoc, ?Value)
True if Key-Value is an association in Assoc. Enumerates keys in ascending order on backtracking.
See also
get_assoc/3.

<

ClioPatria (version V3.1.1-42-gd6a756b-DIRTY)