On Fri, May 25, 2018 at 01:23:00PM +0200, Arie van Wingerden wrote: > I've rewritten the article, but not yet on the Wiki. I cleaned up a lot of > unnecessary markup stuff. > I'll post it within this mail.Please comment before I put it up on the Wiki!
OK > - nil and t are just symbols (yoy could define a function using those as > names). NIL and T are the boolean values for False and True Yes, but what I meant is that 'nil' and 't' *are* already functions. You can redefine them though. > - NIL is equal to the empty list () since: (= NIL ()) Yes, and much more, see: https://software-lab.de/doc/ref.html#nilSym > ------------------------------ > Value of symbol 'de' > > :de > -> 266836 > > returns the address of function 'de' in memory > > ------------------------------ > Function 'de' accepts 2 arguments, which are by default NIL I would not explicitly stress here that arguments default to NIL, as this a general automatic mechanism, not specific to 'de'. Also, to be exact, 'de' is not restricted to 2 arguments. It is a function which expects an arbitrary number of arguments, and which does not evaluate them (i.e. an FEXPR (or, more correct, an FSUBR as it is a built-in)). ### ... all correct ... ### > : (de x (a b) (println a) (println b) (println (+ a b)) (+ 5 6)) > -> x > > : x > -> ((a b) (println a) (println b) (println (+ a b)) (+ 5 6)) > > where a and b are the formal parameters and we also see 4 expressions in > the function body This is correct too, but I would recommend to stick to the naming conventions and use upper-case names for parameters and local variables. : (de x (A B) (println A) (println B) (println (+ A B)) (+ 5 6)) > : (setq x '((p q) (println p) (println q) (+ p q))) > -> ((p q) (println p) (println q) (+ p q)) Same here, better is P and Q and later X and Y. Good! :) ♪♫ Alex -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
