Shooting XQuery arrows fast and accurately
summary
Library crossbow makes the XQuery 3.1 arrow operator practical by shipping concrete helpers: numeric comparators, accessors, for-each-index, sort-by, group-by and categorize, plus combiners that merge multiple passes into one to avoid repeated iteration. It documents pitfalls: anonymous-function calls need extra parentheses, arity shorthand and context item are unsupported, and arrow differs from the simple map operator (count behaves differently). Examples show filtering 1..9 to >5, building [8,3] via sort+slice, and fold-left–based reductions that work but lose the original item unless accessor patterns are used.
AI-written summary · about
