Recently we observed how we solved the same task in different versions of XPath: 2.0, 3.0, and 3.1.
Consider, you have a sequence $items, and you want to call some function over each item of the sequence, and to return combined result.
In XPath 2.0 this was solved like this:
for $item in $items return
In XPath 3.0 this was solved like this:
And now with XPath 3.1 that defined an arrow operator => we attempted to write something as simple as:
That is definitely not working, as it is the same as f:func($items).
Next attempt was:
That even does not compile.
So, finally, working expression using => looks like this:
This looks like a step back comparing to XPath 3.0 variant.
More than that, XPath grammar of arrow operator forbids the use of predictes, axis or mapping operators, so this won't compile:
Our conclusion is that arrow operator is rather confusing addition to XPath.