Add pairs_keys/2 built-in predicate. Unifies its second argument with a list of keys obtained from the list of Key-Value pairs provided as its first argument. e.g.:
?- pairs_keys([a-y, c-x, b-z], L)
L = [a,c,b]
?- pairs_keys([a-y, a-x, a-z], L)
L = [a,a,a]
Add pairs_values/2 built-in predicate. Unifies its second argument with a list of values obtained from the list of Key-Value pairs provided as its first argument. e.g.:
?- pairs_values([a-y, c-x, b-z], L)
L = [y,x,z]
?- pairs_values([a-y, c-y, b-y], L)
L = [y,y,y]
pairs_keys/2
built-in predicate. Unifies its second argument with a list of keys obtained from the list of Key-Value pairs provided as its first argument. e.g.:pairs_values/2
built-in predicate. Unifies its second argument with a list of values obtained from the list of Key-Value pairs provided as its first argument. e.g.: