Re: anonymous functions? anonymous variables

Dimitre Novatchev <[email protected]>
Newsgroups gmane.text.xml.saxon.help
Message-ID <CAK4KnZfkV54Mu1_jQ2MSeNJW=ZiKOz65my8KZpEHiAqKTfgPnw@mail.gmail.com>
> 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 :)}


On Sat, Aug 15, 2020 at 6:30 PM Ihe Onwuka <[email protected]> wrote:

> Since I don't have to give a function a name it would also be nice if I
> didn't have to name variables I am not using.
>
> e.g
>
> Suppose I have a constraint that a function must have 2 arguments but I
> only need to use one I have to write
>
> function ($k, $v) {$v}
>
> instead of something like
>
> function (_,$v) {$v}
>
>
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/saxon-help



-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they write
all patents, too? :)
-------------------------------------
Sanity is madness put to good use.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.