• 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
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(assoc): Association lists
          • Introduction
          • Creating association lists
          • Querying association lists
          • Modifying association lists
          • Conversion predicates
            • assoc_to_list/2
            • assoc_to_keys/2
            • assoc_to_values/2
          • Reasoning about association lists and their elements
    • Packages

A.4.5 Conversion predicates

Conversion of (parts of) an association list to lists is possible with:

[det]assoc_to_list(+Assoc, -Pairs)
Translate Assoc to a list Pairs of Key-Value pairs. The keys in Pairs are sorted in ascending order.
[det]assoc_to_keys(+Assoc, -Keys)
True if Keys is the list of keys in Assoc. The keys are sorted in ascending order.
[det]assoc_to_values(+Assoc, -Values)
True if Values is the list of values in Assoc. Values are ordered in ascending order of the key to which they were associated. Values may contain duplicates.

ClioPatria (version V3.1.1-51-ga0b30a5)