• 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.34 library(pairs): Operations on key-value lists
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(pairs): Operations on key-value lists
          • pairs_keys_values/3
          • pairs_values/2
          • pairs_keys/2
          • group_pairs_by_key/2
          • transpose_pairs/2
          • map_list_to_pairs/3
    • Packages
Availability::- use_module(library(pairs)).(can be autoloaded)
Source[det]map_list_to_pairs(:Function, +List, -Keyed)
Create a Key-Value list by mapping each element of List. For example, if we have a list of lists we can create a list of Length-List using
    map_list_to_pairs(length, ListOfLists, Pairs),

ClioPatria (version V3.1.1-51-ga0b30a5)