Ah - it's a precedence problem. Try putting the partial apply in parentheses:
function($k, $v) {
"$k=" || $k
} =>
(map:for-each(
map {
"a" : "1",
"b" : "2",
"c" : "3"
},
?
))()
John
On 11/03/2019 10:22, John Snelson wrote:
> On 11 Mar 2019, at 17:22, John Snelson wrote:
>
> Looks like a bug to me. The first argument of the partially applied
> "map:for-each" is the one marked with a "?".
Not sure what you mean by "bug" here, but I think it's doing what the spec
says.
A => B(x, ?)()
means
B(A, x, ?)()
not
Looks like a bug to me. The first argument of the partially applied
"map:for-each" is the one marked with a "?".
On 10/03/2019 23:45, Adam Retter wrote:
Thanks Zach. I suspect you are right. However I can't help wishing that the
argument placeholders should be resolved before the arrow operator
"b" : "2",
"c" : "3"
},
?
)
)()
Makes me also wonder though if partial functions should be resolved first.
Interesting!
From: talk-boun...@x-query.com On Behalf Of Adam
Retter
Sent: Montag, 11. März 2019 07:45
To: Zachary N. Dean
Cc: t
Thanks Zach. I suspect you are right. However I can't help wishing that the
argument placeholders should be resolved before the arrow operator is
applied...
For the average developer, the fact that my first query raises an error
seems non intuitive, especally in light of the reformulation in my
Hello Adam,
I think the issue is that the Arrow Operator '=>' is simply "syntactic
sugar" for using the LHS as the FIRST argument of the function call on the
RHS.
The Argument Placeholder '?' has no direct relation to the Arrow Operator.
So, in the case of the first example:
function($k, $v) {