This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Pointed out by Wouter S. Hager on the xquery-talk list: <quote> Not sure if anyone already noticed, but there's an error in the XPath/XQuery F&O docs, where the example implementation of array:fold will always return an array... </quote> It seems that in the "reference implementation" given to specify the function, then [$zero] should read then $zero to ensure that the function delivers the result implied by the examples and notes, as well as all the test cases in the test suite. The same error is present in array:fold-left.
Because of the current timescales I have committed this fix to the specs pending WG approval at the next opportunity.
The WG agrees