On Sun, Nov 24, 2019 at 03:04:36AM -0500, Mark H Weaver wrote: > Hi Zelphir, > > Zelphir Kaltstahl <[email protected]> writes: > > > I've noticed a strange behavior of hash tables [...]
> > (define SQUARES
> > ;; vector, constant time access
> > #('A1 'B1 'C1 'D1 'E1 'F1 'G1 'H1
[...]
> I guess that you meant for this to be a vector of symbols. In fact, it
> is a vector of lists of the form (quote <symbol>), for which '<symbol>
> is a shorthand.
>
> scheme@(guile-user)> (vector-ref SQUARES 0)
> $10 = (quote A1)
Yikes. I'd fall into this trap, too. Thanks you both for illustrating
it so well -- and thanks, Mark, for your unfailing sharp vision :-)
So the best thing for one's brain is to train it to read #(...)
as some weird relative of '(...)?
Is there a corresponding weird relative of `(...)?
Cheers
-- tomás
signature.asc
Description: Digital signature
