Fix treap-values, which had been returning the keys (!)

This commit is contained in:
Tony Garnock-Jones 2015-12-11 15:20:51 +13:00
parent 309ca6f349
commit 85450362fb
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@
(let walk ((n (treap-root t)) (acc '()))
(match n
[(L) acc]
[(N k _ _ left right) (walk left (cons k (walk right acc)))])))
[(N _ v _ left right) (walk left (cons v (walk right acc)))])))
(define (treap-fold t f seed)
(let walk ((n (treap-root t)) (acc seed))