Re: [racket] hash table confusion

2013-12-30 Thread Manfred Lotz
PM, "J. Ian Johnson" > > wrote: > > > >> You want to make sure your structs are inspectable. You can define > >> your structs with the #:transparent option or define your own > >> equality relation with the gen:equal+hash generic interface. > >> -Ian &

Re: [racket] hash table confusion

2013-12-30 Thread Robby Findler
>> -Ian >> - Original Message - >> From: Manfred Lotz >> To: users@racket-lang.org >> Sent: Sat, 28 Dec 2013 15:41:28 -0500 (EST) >> Subject: [racket] hash table confusion >> >> I have a hash table (created by using make-hash) where the key

Re: [racket] hash table confusion

2013-12-28 Thread Sam Tobin-Hochstadt
:28 -0500 (EST) > Subject: [racket] hash table confusion > > I have a hash table (created by using make-hash) where the key is a > struct. This seems to work fine although the documentation says >The make-hash procedure creates a table where keys are compared with >equal?,..

Re: [racket] hash table confusion

2013-12-28 Thread Manfred Lotz
ok I got it. In my source with the hash table I indeed used #:transparent which made equal? work as I expected. Thanks for clarifying. -- Manfred > - Original Message - From: Manfred Lotz > To: > users@racket-lang.org Sent: Sat, 28 Dec 2013 > 15:41:28 -0500 (EST) Subject

Re: [racket] hash table confusion

2013-12-28 Thread J. Ian Johnson
:41:28 -0500 (EST) Subject: [racket] hash table confusion I have a hash table (created by using make-hash) where the key is a struct. This seems to work fine although the documentation says The make-hash procedure creates a table where keys are compared with equal?,... and it seems that equal

[racket] hash table confusion

2013-12-28 Thread Manfred Lotz
I have a hash table (created by using make-hash) where the key is a struct. This seems to work fine although the documentation says The make-hash procedure creates a table where keys are compared with equal?,... and it seems that equal? gives #f if I compare two structs having the same conte