Loading TOC...


   $seq as Sequence
) as String?


Returns the first item in a sequence. For more details, see XPath 3.0 Functions and Operators.

$seq A Sequence of items. A single item is treated as a Sequence of one. An Array is treated as a single item -- if an Array is passed in, the Array is returned. To make a Sequence from an Array see xdmp.arrayValues.


=> 1

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.


The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • The return type is `String?`, but in XQuery it is `item()?`. Sounds like a bug to me...
  • What's the second parameter? The F&O spec contains only one arity, and I cannot make sense of the `arg` description above...