[Bug 21797] Ordering of parameters in '16.2 Basic higher-order functions'

https://www.w3.org/Bugs/Public/show_bug.cgi?id=21797

--- Comment #3 from Michael Kay <mike@saxonica.com> ---
There's a classic example in the spec of a function call that would be more
readable if arguments are reordered. This:

declare function eg:index-of-node($seq as node()*, $search as node()) as
xs:integer* 
{
  fn:for-each-pair(function($node, $index) {
     if($node is $search) then $index else () 
  }, $seq, 1 to fn:count($seq))
}

would become this:

declare function eg:index-of-node($seq as node()*, $search as node()) as
xs:integer* 
{
  fn:for-each-pair(
     $seq,
     1 to fn:count($seq),
     function($node, $index) {
        if($node is $search) then $index else () 
     })
}

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 29 April 2013 22:02:42 UTC