From 482852a6d6d007aa378998c6ad2b19f923b52bba Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Tue, 15 Mar 2016 10:52:16 -0400 Subject: [PATCH] Correct severe flaw in hash-function (typo, "a" for "os"!) --- prospect/trie.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prospect/trie.rkt b/prospect/trie.rkt index 2b8c096..a335ff2 100644 --- a/prospect/trie.rkt +++ b/prospect/trie.rkt @@ -131,12 +131,12 @@ (eq? h1 h2))) (define (hash-proc a h) (match-define (branch os w h) a) - (+ (eq-hash-code a) + (+ (eq-hash-code os) (eq-hash-code w) (eq-hash-code h))) (define (hash2-proc a h) (match-define (branch os w h) a) - (bitwise-xor (eq-hash-code a) + (bitwise-xor (eq-hash-code os) (eq-hash-code w) (eq-hash-code h)))] #:methods gen:custom-write