help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling a function with undefined symbol


From: Emanuel Berg
Subject: Re: Calling a function with undefined symbol
Date: Thu, 03 Nov 2022 13:15:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Michael Heerdegen wrote:

>> Yes, but why do you need the "strange value" for that?
>
> I chose it because you get an `equal' value when you quote
> the value (to suggest a wrong track to an answer), and

You do?

(setq print-circle t)

(setq x #1=(quote #1#))

(eq    'x x) ; nil
(equal 'x x) ; nil

?

> Ok - so here is part two of the exercise to check whether
> you have understood quoting. Is the `length' of this strange
> value `''''''...`
>
>   (a) 0   or
>   (b) 1   or
>   (c) 2   or
>   (d) infinite/undefined ?

The length is 2 (it's a list) because `quote' does not
evaluate anything, not even itself, however this pattern is
repeated at the second element so there it is either cyclic or
indefinite,

  (quote (quote (quote ... )))

So the length is 2, but the depth is infinite. IOW: It's a trap!

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]