protocol
Dictionary protocol.
Paulo Moura
1.0
2000/7/24
static
(no dependencies on other files)
Converts a list of key-value pairs to a dictionary.
static
as_dictionary(List, Dictionary)
as_dictionary(@list, -dictionary) – one
Converts a dictionary to a list of key-value pairs.
static
as_list(Dictionary, List)
as_list(@dictionary, -list) – one
Deletes a matching Key-Value pair from a dictionary, returning the updated dictionary.
static
delete(Dictionary_in, Key, Value, Dictionary_out)
delete(+dictionary, @ground, ?term, -dictionary) – zero_or_one
True if the dictionary is empty.
static
empty(Dictionary)
empty(@dictionary) – zero_or_one
Inserts a Key-Value pair into a dictionary, returning the updated dictionary.
static
insert(Key, Value, Dictionary_in, Dictionary_out)
insert(+ground, @term, +dictionary, -dictionary) – one
Inserts a list of Key-Value pairs into a dictionary, returning the updated dictionary.
static
insert_all(List, Dictionary_in, Dictionary_out)
insert_all(@list, +dictionary, -dictionary) – one
Get a matching Key-Value pair from a dictionary.
static
lookup(Key, Value, Dictionary)
lookup(+ground, ?term, @dictionary) – zero_or_one
lookup(-ground, ?term, @dictionary) – zero_or_more
Returns a list with all dictionary keys.
static
keys(Dictionary, List)
keys(@dictionary, -list) – one
Maps a binary predicate over each dictionary key-value pair returning a new pair.
static
map(Functor, In, Out)
map(+functor, +dictionary, -dictionary) – zero_or_one
Number of dictionary entries.
static
size(Dictionary, Size)
size(@dictionary, ?integer) – zero_or_one
(none)
(none)