mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 11:23:46 +00:00
Branches: main, 11.07
Add the predicate map.keys_and_values/3 to the standrad library.
library/map.m:
library/tree234.m:
Add the new predicate.
NEWS:
Announce the new predicate.
tests/hard_coded/Mmakefile:
tests/hard_coded/test_keys_and_values.{m,exp}:
Test the new predicate.
11 lines
249 B
Plaintext
11 lines
249 B
Plaintext
KeysPrime = []
|
|
ValuesPrime = []
|
|
KeysPrime = ["one"]
|
|
ValuesPrime = [1]
|
|
KeysPrime = ["one", "two"]
|
|
ValuesPrime = [1, 2]
|
|
KeysPrime = ["one", "three", "two"]
|
|
ValuesPrime = [1, 3, 2]
|
|
KeysPrime = ["four", "one", "three", "two"]
|
|
ValuesPrime = [4, 1, 3, 2]
|