Fix treap-values, which had been returning the keys (!)
This commit is contained in:
parent
309ca6f349
commit
85450362fb
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue