Extra signature for fn:filter shown on wiki page
Hi,
The documentation page
http://docs.basex.org/wiki/Higher-Order_Functions#fn:filter
shows two signatures for the fn:filter function, the second of which is in gray. Does it belong? It doesn't seem to work or match the spec, but I'm hesitant to delete it from the wiki in case I am wrong.
fn:filter($seq as item()*, $pred as function(item()) as xs:boolean)) as item()*
fn:filter($pred as function(item()) as xs:boolean, $seq as item()*) as item()*Thanks, Amanda
Hello Amanda,
you are invited to delete that. I am pretty sure that is left from a change to the spec (and accordingly the change in our function signatures). Some time ago, the argument order for the HOF functions in the spec was changed, moving the sequence items to the first argument position. So the gray version is actually outdated and as we didn't keep in the the other function signatures I think it is safe to delete it.
Cheers, Dirk
Quoted text · Amanda Galtman · 13 lines
On 17/08/14 03:19, Amanda Galtman wrote: > Hi, > > The documentation page > http://docs.basex.org/wiki/Higher-Order_Functions#fn:filter > shows two signatures for the fn:filter function, the second of which is in gray. Does it belong? It doesn't seem to work or match the spec, but I'm hesitant to delete it from the wiki in case I am wrong. > > fn:filter($seq as item()*, $pred as function(item()) as xs:boolean)) as item()* > fn:filter($pred as function(item()) as xs:boolean, $seq as item()*) as item()* > > Thanks, > Amanda >
Thanks for repyling, Dirk. I will delete the gray syntax from that wiki page.
Cheers, Amanda
Quoted text · Dirk Kirsten · 47 lines
> Date: Sun, 17 Aug 2014 07:44:16 +0200 > From: Dirk Kirsten <dk at basex.org> > To: basex-talk at mailman.uni-konstanz.de > Subject: Re: [basex-talk] Extra signature for fn:filter shown on wiki > page > Message-ID: <53F04130.80100 at basex.org> > Content-Type: text/plain; charset=ISO-8859-1 > > Hello Amanda, > > you are invited to delete that. I am pretty sure that is left from a change to > the spec (and accordingly the change in our function signatures). Some time > ago, the argument order for the HOF functions in the spec was changed, > moving the sequence items to the first argument position. > So the gray version is actually outdated and as we didn't keep in the the > other function signatures I think it is safe to delete it. > > Cheers, > Dirk > > On 17/08/14 03:19, Amanda Galtman wrote: > > Hi, > > > > The documentation page > > http://docs.basex.org/wiki/Higher-Order_Functions#fn:filter > > shows two signatures for the fn:filter function, the second of which is in > gray. Does it belong? It doesn't seem to work or match the spec, but I'm > hesitant to delete it from the wiki in case I am wrong. > > > > fn:filter($seq as item()*, $pred as function(item()) as xs:boolean)) > > as item()* fn:filter($pred as function(item()) as xs:boolean, $seq as > > item()*) as item()* > > > > Thanks, > > Amanda > > > > -- > Dirk Kirsten, BaseX GmbH, http://basex.org > |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz > |-- Registergericht Freiburg, HRB: 708285, Gesch?ftsf?hrer: > | Dr. Christian Gr?n, Dr. Alexander Holupirek, Michael Seiferle > `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 > > > End of BaseX-Talk Digest, Vol 56, Issue 33 > ******************************************
Written for BaseX 7.9. BaseX may have changed since: please check the current documentation.