A.4.6 Reasoning about association lists and their elements
Further inspection predicates of an association list and its elements are:
- [semidet]is_assoc(+Assoc)
- True if Assoc is an association list. This predicate checks that the structure is valid, elements are in order, and tree is balanced to the extent guaranteed by AVL trees. I.e., branches of each subtree differ in depth by at most 1. Does not validate that keys are sufficiently instantiated to ensure the tree remains valid if a key is further instantiated.
- [semidet]map_assoc(:Pred, +Assoc)
- True if Pred(Value) is true for all values in Assoc.
- [semidet]map_assoc(:Pred, +Assoc0, ?Assoc)
- Map corresponding values. True if Assoc is Assoc0 with Pred applied to all corresponding pairs of of values.