Re: anonymous functions? anonymous variables
Ihe Onwuka <[email protected]>
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <CALfs7+zp=5LEFMw=vCSWAqXCqf14pEsczWDngDkLtxSXbKiJtQ@mail.gmail.com> |
On Sun, Aug 16, 2020 at 1:43 PM Dimitre Novatchev <[email protected]> wrote: > > I have to write > > > > function ($k, $v) {$v} > > > > instead of something like > > > > function (_,$v) {$v} > > What is the rationale to have the signature of the function contain an > unreferenced argument? Why not use just: > > function ($v) { (: Expr :)} > > It may be a constraint imposed by the context in which the function is being used. See for example https://www.w3.org/TR/xslt-30/#func-map-for-each where the function supplied must have two arguments whereas the use case only requires the use of one. _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [email protected] https://lists.sourceforge.net/lists/listinfo/saxon-help