Code: Select all
(define Bigtree:Bigtree)
(new Tree 'Bigtree)
(define (fill-tree)
(for (x 1 20000)
(Bigtree (string (random 10 5)) (string (random 5 5)))
)
)
(define (show-size name)
(length name)
)
(define (show-tree name)
name
)
(fill-tree)
(show-size (Bigtree))
On the first iteration (show-size) returns 20000
After running (fill-tree) another round the function (show-size) returns 39998
Doing this again will return 59995.
Am I doing something wrong with the hashes?
Cheers
Hilti