Arrow operator and ParenthesizedExpr

If I understand the syntax productions correctly, the following is legal:

let $a := concat('hello', ?)
let $b := concat('world', ?)
return "!" => ($a, $b)()

The spec only talks of "the function" with respect to the rhs of the expression. But here it is a sequence of expressions. Likewise, if the rhs sequence evaluates to the empty sequence, is the result the empty sequence?

If I were to interpret the above, assuming it is allowed, I'd say the output should be: ("hello!", "world!") (i.e., a sequence of two items, as a result of applying the arrow operator to each item in the sequence).

If this is indeed legal, perhaps we can change the text to read "An arrow operator applies a sequence of functions to the value of...". If it is not legal (but legal syntax), perhaps we can say it isn't, for instance by saying that the result of evaluating ArrowFunctionSpecifier must be one-and-only-one.

Cheers,
Abel

Received on Thursday, 10 September 2015 14:41:34 UTC