A.4.4 Modifying association lists
Elements of an association list can be changed and inserted with:
- [det]put_assoc(+Key, +Assoc0, +Value, -Assoc)
- Assoc is Assoc0, except that Key is associated with Value. This can be used to insert and change associations.
- [semidet]del_assoc(+Key, +Assoc0, ?Value, -Assoc)
- True if Key-Value is in Assoc0. Assoc is Assoc0 with Key-Value removed.
- [semidet]del_min_assoc(+Assoc0, ?Key, ?Val, -Assoc)
- True if Key-Value is in Assoc0 and Key is the smallest key. Assoc is Assoc0 with Key-Value removed. Warning: This will succeed with no bindings for Key or Val if Assoc0 is empty.
- [semidet]del_max_assoc(+Assoc0, ?Key, ?Val, -Assoc)
- True if Key-Value is in Assoc0 and Key is the greatest key. Assoc is Assoc0 with Key-Value removed. Warning: This will succeed with no bindings for Key or Val if Assoc0 is empty.