[xquery-talk] How to Reverse an Array

Michael Kay mike at saxonica.com
Fri Jul 17 07:54:47 PDT 2015


> On 17 Jul 2015, at 14:31, Ghislain Fourny <g at 28.io> wrote:
> 
> Hi Eliot,
> 
> I'd just go to the sequence space and back:
> 
> array { reverse(array:flatten($array)) }
> 

That doesn’t work if the array contains sequences (of length > 1) - flattening loses the sequence boundaries.

Michael Kay




More information about the talk mailing list