I think that it means the following:In newLISP, nil and the empty list () are not the same as in some other Lisps. Only in conditional expressions are they treated as a Boolean false, as in and, or, if, while, unless, until, and cond.
Then,1.The empty list () is treated as the Boolen false in the following functions :
and, cond, do-until, do-while, if, if-not, or, unlrss, when, while
2.The empty list () is treated as the Boolen true excluding the above primitive functions.
Code: Select all
> (map rest '((a b) (a) ()))
((b) () ())
> (filter rest '((a b) (a) ()))
((a b) (a) ())
> (clean rest '((a b) (a) ()))
()
> (map (fn (x) (or (rest x) nil)) '((a b) (a) ()))
((b) nil nil)
> (filter (fn (x) (or (rest x) nil)) '((a b) (a) ()))
((a b))
> (clean (fn (x) (or (rest x) nil)) '((a b) (a) ()))
((a) ())
>
Code: Select all
> (title-case "aBCDE")
"ABCDE"
> (title-case "aBCDE" true)
"Abcde"
> (title-case "aBCDE" '())
"ABCDE"
>