Page 1 of 1

(cdr nil)

PostPosted: Tue Dec 21, 2004 8:42 pm
by Ramiro
In clisp (cdr nil) => nil but in openlisp (cdr nil) gives an error.
is this correct?

Re: (cdr nil)

PostPosted: Thu Dec 23, 2004 7:24 pm
by jullien
Ramiro wrote:In clisp (cdr nil) => nil but in openlisp (cdr nil) gives an error.
is this correct?


Yes this is mandatory by ISLISP standard

The function car returns the left component of the cons. An error shall be signaled if cons is not a cons (error-id. domain-error).

Example:

(car '()) ;; an error shall be signaled