Browse thread
[Caml-list] Q: safe language
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Yutaka OIWA <oiwa@y...> |
| Subject: | Re: [Caml-list] Q: safe language |
>> On Fri, 30 Aug 2002 09:46:50 -0400, Oleg <oleg_inconnu@myrealbox.com> said:
> On Friday 30 August 2002 09:05 am, David Frese wrote:
>> > (cadr '(1))
>>
>> This shows that Lisp is safe, because it results in an error, and does
>> not return some value from out of nowhere (or does it).
> On Debian CMUCL it returns NIL.
In Common Lisp, the cdr of () is defined to be (). The car of () is also ().
I personally hate this definition :-(
# car x = car y, cdr x = cdr y, but x <> y
# if x = (()) and y = ()
--
Yutaka Oiwa Yonezawa Lab., Dept. of Computer Science,
Graduate School of Information Sci. & Tech., Univ. of Tokyo.
<oiwa@yl.is.s.u-tokyo.ac.jp>, <yutaka@oiwa.shibuya.tokyo.jp>
PGP fingerprint = C9 8D 5C B8 86 ED D8 07 EA 59 34 D8 F4 65 53 61
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners