On Monday 14 of March 2011 08:52:37 you wrote:
> > creating a lisp function is a function call to (de).
> since lisp has a reputation of being a functional language, this
> observation is interesting. Lisp, and picolisp in particular, is quite
> imperative althought it can be programmed in a functional style.

please correct me if i'm wrong, but it seems to me the `de' is not *needed*=
for creating a function. rather, it's a shorthand of doing the usual thing:=
assign a (freshly defined) function to a symbol.

(eval '( '((with)
   (prinl "executed with " with) )

here i have an eval of a list. the fist element on the list is a (quoted)=20
function definition; the second is 33.

the definition of the function itself:
'( (with)
   (prinl "executed with " with) )
# quote to prevent in-line evaluation

the function definition is just a list too. the first element of the functi=
definition is parameter list (here: `with'), everything later is expression=
s to=20
be executed, one by one.

the eval evaluates a list like [1]: take first element, consider it a funct=
to be called. take the rest, pass it as arguments to the function. the=20
function to be called may be either indicated by a symbol, or, as in my cas=
stated literally.

the morale would be, a function is just a list of stuff. it can be created =
hand', it can be modified at runtime ((debug, trace and traceAll instrument=
function with extra code)).=20

[1] http://software-lab.de/doc/ref.html#ev
dexen deVries


``In other news, STFU and hack.''
mahmud, in response to Erann Gat's ``How I lost my faith in Lisp''
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to