On Monday 14 of March 2011 08:52:37 you wrote: > > creating a lisp function is a function call to (de). >=20 > 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*= =20 for creating a function. rather, it's a shorthand of doing the usual thing:= =20 assign a (freshly defined) function to a symbol. (eval '( '((with) (prinl "executed with " with) ) 33)) 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 =20 the function definition is just a list too. the first element of the functi= on=20 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= ion=20 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= e,=20 stated literally. the morale would be, a function is just a list of stuff. it can be created = `by=20 hand', it can be modified at runtime ((debug, trace and traceAll instrument= a=20 function with extra code)).=20 [1] http://software-lab.de/doc/ref.html#ev =2D-=20 dexen deVries [[[=E2=86=93][=E2=86=92]]] ``In other news, STFU and hack.'' mahmud, in response to Erann Gat's ``How I lost my faith in Lisp'' http://news.ycombinator.com/item?id=3D2308816 -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
