In Common Lisp 'nil' is a list terminator in newLISP 'nil' is a boolean value only. Consider this in SBCL:
Code: Select all
* (car '())
NIL
* (car '(nil))
NIL
*
but in Scheme and newLISP things are similar, in SISC (R5RS Scheme) :
Code: Select all
#;> (car '())
Error in car: expected type pair, got '()'.
console:3:1: <from>
#;> (car '(nil))
nil
#;>
and in newLISP similar:
Code: Select all
> (first '())
ERR: list is empty in function first : '()
> (first '(nil))
nil
>
Both Scheme and newLISP give an error when using 'car' or 'first' on an empty list. The documentation does not use the word
same but uses the weaker
equivalent. I don't want to go too much into these type of differences in the newLISP manual, but I could add your observation here:
http://www.newlisp.org/index.cgi?page=D ... ther_LISPs
perhaps an additional paragraph after the explanations about 'cons' or in the paragraph about 'nil' and 'true'.