By https://docs.racket-lang.org/reference/symbols.html, Two interned symbols are eq? to each other.
But in the other example, you are comparing two lists each containing a single symbol. A new list is created in each expression, and eq? is comparing the object references and not the content. For comparison (let ([l (quote a)]) (eq? l l)) evaluates to #t ~slg ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Friday, October 25, 2019 10:34 AM, wanderley.guimar...@gmail.com <wanderley.guimar...@gmail.com> wrote: > Why (eq? (quote a) (quote a)) is #t but (eq? (quote (a)) (quote (a))) > is #f? I would expect that if (quote (a)) was a mutable pair but it > is not since (quote (a)) returns #f. It seems that guile returns #t > as I was expecting. > > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/CAAmHZof2uu7hkU4eMNz510UFOX4Pn5RUhj08_zHobqCcshdhug%40mail.gmail.com. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/yT81-_ZRmjRpBGWsbWng8eFEx3qSl0zijv0vEMKfnRdOg0X5At1HSiV5WyRnQnBWutXhPh4T9GnMDupmoV4j6ENTM3zvYBPPp50M9Pkrhl0%3D%40sagegerard.com.