>
> Note: I am still not entirely clear why 'enum? can return unexpected (at
> least to me) results in the sparse array case (see below)
> Is it because 'enum precreates key nodes in the tree for a sparse array in
> order to keep it balanced?.
>
>
Ok. I think I get the structure.
(val (enum? *HT Val) is the test I need to use and is very fast!

My apologies for the email noise as I worked through this.

/Lindsay

(de TestEnum (N)
   (off *HT)
   (for I N
      (let (Val (Hasher I))
         (if (val (enum? *HT Val))
            (prinl
               "! Duplicate: "
               I
               "; "
               Val
               "; "
               (sym (enum? '*HT Val))
               "; "
               (sym (val (enum '*HT Val))) )


             (set (enum '*HT Val) I) ) ) ) )



: (TestEnum (** 2 16))
-> 65536
: (TestEnum (** 2 18))
-> 262144
: (TestEnum (** 2 20))
-> 1048576

Reply via email to