fn:reverse( $target as item()* ) as item()*
Reverses the order of items in a sequence. If $arg is the empty sequence, the empty sequence is returned.
For detailed type semantics, see Section 7.2.12 The fn:reverse function[FS].
Parameters | |
---|---|
target | The sequence of items to be reversed. |
let $x := ("a", "b", "c") return fn:reverse($x) => ("c", "b", "a")
fn:reverse(("hello")) => ("hello")
fn:reverse(()) => ()