A.33 library(pairs): Operations on key-value lists
All
Application
Manual
Name
Summary
Help
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)
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),