Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAMTs exhibit strange behavior when inserting tenths of values #10

Open
tbrezot opened this issue Dec 30, 2024 · 0 comments
Open

HAMTs exhibit strange behavior when inserting tenths of values #10

tbrezot opened this issue Dec 30, 2024 · 0 comments

Comments

@tbrezot
Copy link

tbrezot commented Dec 30, 2024

I just installed this library using Guix (guile-pfds v.0.3), but I encounter behaviors I cannot explain:

(use-modules (srfi srfi-1))
(use-modules (pfds hamts))
(define make-string-hamt (lambda () (make-hamt string-hash string=?)))
(define hamt (fold (lambda (i hamt) (hamt-set hamt (format #f "~d" i) i))
                   (make-string-hamt)
                   (iota 100)))
(hamt-size hamt)

returns 78. Stranger, even:

(define hamt (hamt-set hamt "1" 1))
(hamt-ref hamt "1" #f)

Returns #f.

My version of guile is the v3.0.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant