Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
anonymous functions
- X-seq: zsh-workers 28743
- From: Greg Klanderman <gak@xxxxxxxxxxxxxx>
- To: Zsh list <zsh-workers@xxxxxxx>
- Subject: anonymous functions
- Date: Fri, 11 Feb 2011 12:17:46 -0500
- In-reply-to: <AANLkTinerHxXBs4vc_+UXFMxsrui7EKBNhdH01a0wqn6@mail.gmail.com> (Bart Schaefer's message of "Fri, 11 Feb 2011 08:26:13 -0800")
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <AANLkTikFsJGitoiU49kJphErOsxbCN_BrerNcaHcb2kR@mail.gmail.com> <AANLkTinerHxXBs4vc_+UXFMxsrui7EKBNhdH01a0wqn6@mail.gmail.com>
- Reply-to: gak@xxxxxxxxxxxxxx
>>>>> On February 11, 2011 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> If your zsh is recent enough to have anonymous functions
Why are these things called 'anonymous functions'? That name connotes
lambda, which would create an unnamed function you could store in a
variable, pass as an argument, return from a function, and call at
some later time. They should be called 'local scopes' or 'local
blocks' or even 'blocks', and use their own reserved word.
The concepts are of course related; in lisp-like languages
(let ((a <e1>) (b <e2>) (c <e3>)) <body>)
is of course equivalent to
((lambda (a b c) <body>) <e1> <e2> <e3>)
Greg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author