Subject: green's functions, passing functions to a routine
From: Stavros Macrakis
Date: Mon, 8 Sep 2008 12:00:52 -0400
On Mon, Sep 8, 2008 at 12:52 AM, John Lapeyre <pdl at johnlapeyre.com> wrote:
> > By the way, when you *do* use functions in non-functional position, it is
> > good practice to quote them so that they don't inadvertently use a
> variable
> > binding that is lying around, e.g. apply('part,...) rather than
>
> I noticed that the compiler takes unquoted functions to be
> global-varibles.
>
The compiler and the interpreter should do the same thing, namely:
-- when interpreting a symbol in variable context (e.g. y+1 or apply(y,z)),
to use the locally-bound value if there is one and otherwise the global
value;
-- when interpreting a symbol in function context (e.g. y(...)), use the
function value if there is one, otherwise treat it as a variable
-s