(cdr nil)

General OpenLisp forum

(cdr nil)

Postby Ramiro » Tue Dec 21, 2004 8:42 pm

In clisp (cdr nil) => nil but in openlisp (cdr nil) gives an error.
is this correct?
Ramiro
 

Re: (cdr nil)

Postby jullien » Thu Dec 23, 2004 7:24 pm

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
jullien
Site Admin
 
Posts: 30
Joined: Fri Nov 12, 2004 12:29 am


Return to General discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron