newby question -- Lambda????



Thanks to everyone this now is clear
Doug Stewart

Stavros Macrakis wrote:

> Lambda is a way of writing a function without giving it a name (an 
> anonymous function).
>
> Suppose you only need the function f(x):=x^3-1 in one place.  Instead 
> of writing
>
>        f(x):=x^3-1$
>        map(f,[a,b,c])
>
> you can write
>
>        map( lambda([x],x^3-1) , [a,b,c])


hi doug,


>> I see that it can be a macro or a nameless function
>> Is the reason of having a nameless function   because it will be 
>> disposed of when it finishes whereas a named function would stay
>> around for future use?
>  
>

that's pretty much it. use of lambda expressions is
pretty typical when you just want something simple, and
you don't care to have it hanging around after you're finished.
otherwise one ends up with lots of trivial functions which
are mostly uninteresting outside of the limited context for
which they were defined.

map, apply, and lambda are all inherited from Lisp.
these three are all very useful.

hope this helps,
robert dodier