ropes
ropes copied to clipboard
hasheq throws Exception for empty rope
hasheq seems to work for ropes with non empty ropes, but throws for empty ropes.
A short repro:
> (contains? #{(ropes/rope [])} :whatever)
Execution error (NullPointerException) at ropes.core.Rope/hasheq (core.clj:28).
Cannot invoke "java.lang.Iterable.iterator()" because "xs" is null
I also noticed that the hash value isn't cached which may be helpful. Maybe something like https://github.com/thi-ng/geom/blob/a40a7f57b28220a82f500742712309d665811329/src/thi/ng/geom/matrix.cljc#L74