protocol
nested_dictionary_protocol
Nested dictionary protocol.
logtalk_load(nested_dictionaries(loader))staticPublic predicates
new/1
Create an empty (nested) dictionary.
staticnew(Dictionary)new(--dictionary) - oneempty/1
True iff the dictionary is empty.
staticempty(Dictionary)empty(@dictionary) - zero_or_oneas_nested_dictionary/2
Creates a (nested) dictionary term from a curly-brackted term representation.
staticas_nested_dictionary(Term,Dictionary)as_nested_dictionary(++term,--dictionary) - one_or_erroras_curly_bracketed/2
Creates a a curly-brackted term representation from a (nested) dictionary.
staticas_curly_bracketed(Dictionary,Term)as_curly_bracketed(+dictionary,--term) - one_or_errorlookup_in/3
Lookup a chain of keys in a nested dictionary. Unifies Value with Dictionary when Keys is the empty list.
staticlookup_in(Keys,Value,Dictionary)lookup_in(++list(ground),?term,+dictionary) - zero_or_moreupdate_in/4
Updates the value found by traversing through the nested keys.
staticupdate_in(OldDictionary,Keys,Value,NewDictionary)update_in(+dictionary,++list(ground),++term,--dictionary) - zero_or_oneupdate_in/5
Updates the value found by traversing through the nested keys, only succeeding if the value found after traversal matches the old value.
staticupdate_in(OldDictionary,Keys,OldValue,NewValue,NewDictionary)update_in(+dictionary,++list(ground),?term,++term,--dictionary) - zero_or_oneinsert_in/4
Inserts a key-value pair into a dictionary by traversing through the nested keys. When the key already exists, the associated value is updated.
staticinsert_in(OldDictionary,Keys,Value,NewDictionary)insert_in(+dictionary,++list(ground),++term,--dictionary) - zero_or_onedelete_in/4
Deletes a matching key-value pair from a dictionary by traversing through the nested keys, returning the updated dictionary.
staticdelete_in(OldDictionary,Keys,Value,NewDictionary)delete_in(+dictionary,++list(ground),?term,--dictionary) - zero_or_oneProtected predicates
(none)
Private predicates
(none)
Operators
(none)