Hi,
Unless I'm not reading the spec[1] correctly then the following two snippets should have the same result:
Example 1:
let $map := map { 'a': (1,2,3), 'b': (4,5,6)} for $k in map:keys($map) return array { $map($k) }
Example 2:
let $map := map { 'a': (1,2,3), 'b': (4,5,6)} for $k in $map?* return array { $k }
However, this is not the case. The first outputs, as I expected:
([1,2,3], [4,5,6])
The second, counter intuitively returns (on 8.2.3) this:
([1],[2],[3],[4],[5],[6])
The spec indicates that both examples result should be identical. Didn't check if the same is going on with arrays.
Hmmm?