JuliaCollections / FunctionalCollections.jl

Functional and persistent data structures for Julia
MIT License
124 stars 34 forks source link

ERROR: no method next(SparseNode{PersistentArrayMap{Int64,Nothing}}, Bool) #12

Closed kmsquire closed 9 years ago

kmsquire commented 10 years ago

For reference, I wanted to explore the use of PersistentSet for https://groups.google.com/forum/#!topic/julia-users/_FwY0XBZ5eY.

julia> using FunctionalCollections

julia> s = @Persistent Set(5,3,4,6)
PersistentSet{Int64}(6, 4, 5, 3)

julia> s2 = s
PersistentSet{Int64}(6, 4, 5, 3)

julia> for i in s2
           println("i=$i  s=$s  s2=$s2")
           s = disj(s, i-1)
           println("now s=$s  s2=$s2\n")
       end
i=6  s=PersistentSet{Int64}(6, 4, 5, 3)  s2=PersistentSet{Int64}(6, 4, 5, 3)
now s=PersistentSet{Int64}(6, 4, 3)  s2=PersistentSet{Int64}(6, 4, 5, 3)

i=4  s=PersistentSet{Int64}(6, 4, 3)  s2=PersistentSet{Int64}(6, 4, 5, 3)
ERROR: no method next(SparseNode{PersistentArrayMap{Int64,Nothing}}, Bool)
 in next at /home/kmsquire/.julia/v0.3/FunctionalCollections/src/PersistentHashMap.jl:199
 in next at /home/kmsquire/.julia/v0.3/FunctionalCollections/src/PersistentHashMap.jl:200 (repeats 2 times)
 in show at /home/kmsquire/.julia/v0.3/FunctionalCollections/src/PersistentSet.jl:63
 in print at string.jl:3
 in string at string.jl:31
 in anonymous at no file:4

It's probably an easy fix, but I don't have time to follow up on this one right now.

shashi commented 9 years ago

This is fixed now.