[racket] first vs car ; last vs cdr ; empty? vs null?

From: Daniel Carrera (dcarrera at gmail.com)
Date: Fri Mar 7 05:45:23 EST 2014

Hello,

Is there any difference between `first` and `car`, or between `last` and
`cdr`, or between `empty? and null?` ?

I had assumed that these were just synonyms, added by Racket because they
might be more memorable to a student. But apparently Racket doesn't think
they are equal:

-> (equal? first car)
#f
-> (equal? last cdr)
#f
-> (equal? empty? null?)
#f


I suppose that they could be separate functions that happen to do the same
thing, but if so, my next question would be why they aren't just aliases.
As in:

-> (define myfirst car)
-> (equal? myfirst car)
#t

Cheers,
Daniel.
-- 
When an engineer says that something can't be done, it's a code phrase that
means it's not fun to do.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140307/abc891da/attachment-0001.html>

Posted on the users mailing list.