lisp icon indicating copy to clipboard operation
lisp copied to clipboard

car and cdr have different behavior when called on empty list

Open 0xekez opened this issue 3 years ago • 0 comments

In the interpreter (car ()) and (cdr ()) yield () whereas in the compiler both calls result in a type error.

Currently, my preference is for the compilers behavior. It seems like if you ask for the second item of an empty list that is indeed an error. Right now it can be a little confusing but once we get around to improving the compiler's error messages I suspect we can make that error more obvious.

0xekez avatar Jun 07 '21 04:06 0xekez