Hi,
I am using map:merge to construct a map from smaller maps and would like to preserve values when keys agree. For example, when calling
map:merge((map:entry(0, "red"), (map:entry(1, "green"), map:entry(1, "blue")))
I would like to get back something like
map { 0: "red", 1: ("green", "blue") }
The default (W3C) behavior is to drop "green" in favor of "blue".
Is there a simple way to accomplish this? I realize the above example is mixing types so presumably a solution would have all values as sets.
Thanks,
Ron