Talk:Kaprekar numbers: Difference between revisions

Line 277:
** Does not compile on CLISP: exit clause in DO must be a list
** Does not compile on LispWorks: NIL does not match (SYSTEM::END-TEST-FORM &REST SYSTEM::RESULT-FORMS)
:::The following is tha ANSI specification fon NIL
<pre>
1.4.1.4.4 NIL
 
nil has a variety of meanings. It is a symbol in the common-lisp package with the name "NIL", it
is boolean (and generalized boolean) false, it is the empty list, and it is the name of the empty
type (a subtype of all types).
 
Within Common Lisp, nil can be notated interchangeably as either NIL or (). By convention, the
choice of notation offers a hint as to which of its many roles it is playing.
 
Notations for NIL
For Evaluation? Notation Typically Implied Role
Yes nil use as a boolean.
Yes 'nil use as a symbol.
Yes '() use as an empty list
No nil use as a symbol or boolean.
No () use as an empty list.
</pre>
:::From which I and my "antique lisp machine ... installed in your basement" conclude that () may be used as an empty list. Apparently your advanced implementations don't, but this is Lisp for you.--[[User:Nigel Galloway|Nigel Galloway]] 12:14, 9 October 2012 (UTC)
I'm sure that Nigel will respond to these results in his usual manner: "that is hot air", "all of your implementations are flawed; Mine is the only true Common Lisp", "Surely, you must have my version and Ledrug's version mixed up", or even the classic "Why didn't you just fix my code!" Who knows... I'm sure that it will be amusing though. Therefore, I encourage everyone with a working CL implementation to attempt to compile both versions and post your results. --[[User:Lhignight|Larry Hignight]] 07:45, 8 October 2012 (UTC)
2,171

edits