Andrey, you could write your own function like this:
(define (hashes-equal? h0 h1)
(for/and ([k (in-list (hash-keys h0))])
(and (hash-has-key? h1 k)
(equal? (hash-ref h0 k) (hash-ref h1 k)
This should work in general.
If you know that the two hashes use a specific comparison f
Right now i'm understand my mistake. Is there any function to perform
equality check between mutable and immutable hash-tables?
On Mon, Apr 8, 2013 at 7:06 PM, Asumu Takikawa wrote:
> is is actually not a bug. In your example, the TR code creates an
> immutable hash literal with `#hash`. The unt
Oh. Sorry. I was confused by ability to construct hash table many ways. And
problem with type inference for hash in typed racket.
Just rewrited my code and test passed.
sorry for inconvenience. I'm new to Racket :)
On Mon, Apr 8, 2013 at 7:04 PM, Tobias Hammer wrote:
> From the docs (3.13)
> "
On 2013-04-08 18:49:35 +0400, Andrey Larionov wrote:
>Is it a known bug what Typed Racket hash-table fail equality check
>with untyped variant? I'm attaching a source file with a test
>which prove it as on 5.3.3 and Today nightlies.
This is actually not a bug. In your example, the TR
From the docs (3.13)
"Two hash tables cannot be equal? unless they use the same key-comparison
procedure (equal?, eqv?, or eq?), both hold keys strongly or weakly, and
have the same mutability."
Your TR hash is immutable (created with #hash) and your racket hash is
mutable (created with ma
5 matches
Mail list logo