A.4.2 Creating association lists
All
Application
Manual
Name
Summary
Help
Documentation
Reference manual
The SWI-Prolog library
library(assoc): Association lists
Creating association lists
empty_assoc/1
list_to_assoc/2
ord_list_to_assoc/2
Packages
Availability:
:- use_module(
library(assoc)
).
(can be autoloaded)
[det]
list_to_assoc
(
+Pairs, -Assoc
)
Create an association from a list
Pairs
of Key-Value pairs. List must not contain duplicate keys.
Errors
domain_error(unique_key_pairs, List)
if List contains duplicate keys