This module provides unordered maps. The unordered maps are represented by lists of key value pairs [k1-v1, .., kn-vn]. The lists need not be key ordered or key duplicate free. During operations for duplicates the first key wins:Examples:
?- get([2-a,1-b], 1, X).
X = b
?- put([2-a,1-b], 1, c, X).
X = [2-a,1-c]
The realization uses a membership check based on (==)/2. As a result the predicates are safe to be used with non-ground terms. On the other hand, since this comparison is not arithmetical, 1 and 1.0 are for example considered different.
The following maps predicates are provided: