Re: What do we mean by "Identical" ?



+ newser.bbs@xxxxxxxxxxxxxxxxx:

| There is still further examples :
|
|> (eq (= 1 2) (= 3 4))
| T
|
| Does anybody still believe what's said in the CLtL2 ?
| I can't believe that the 2 objects (= 1 2) and (= 3 4) are identical.
| Anybody believes that they are identical ?
| Anybody believes that they share the same menorial location ?

You are confused on a very deep level. This has been explained to you
so many times I don't know what to try next. Repeat after me, please:

BEFORE A FUNCTION IS CALLED, ALL ITS ARGUMENTS ARE EVALUATED.

Repeat it twice more. Then, the step-by step analysis:

(= 1 2) is evaluated, result nil.
(= 3 4) is evaluated, result nil.
eq is called with the two results: nil and nil.
Since nil is in fact identical to nil, eq returns t.
End of story.

Now I'm off for a Sunday bike ride. We're having unseasonally warm
weather now, thanks I'm told to hurricane Wilma, whose remains have
come across the Atlantic to warm these usually frigid lands. When I'm
back, I want to hear that you have mastered this very nasty stumbling
block. Okay? (If not, I'll leave your case in the hands of more able
pedagogues than myself.)

--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- Debating gives most of us much more psychological satisfaction
than thinking does: but it deprives us of whatever chance there is
of getting closer to the truth. -- C.P. Snow
.



Relevant Pages

  • Re: Read-from-string
    ... (loop repeat 3 collect (read s))) ... Is there a way to circumvent this "repeat ... (let ((forms nil)) ... do (push x forms)) ...
    (comp.lang.lisp)
  • Re: CDs for $1 or less: Its true.
    ... And it's even less long before you dodge the issue. ... If I gave the issue a fuller treatment I'd have to repeat myself again. ... Close to nil, I imagine. ...
    (alt.guitar)