I’m new to this. Is this an error in the DataStructurs.jl, or am I doing something wrong?
julia> using DataStructures
julia> animals = MutableLinkedList{String}("cat", "dog", "fish", "mouse")
MutableLinkedList{String}(cat, dog, fish, mouse)
julia> next = iterate(animals)
("cat", DataStructures.ListNode{String}(dog))
julia> next = iterate(animals, next[2])
("dog", DataStructures.ListNode{String}(fish))
julia> next = iterate(animals, next[2])
("fish", DataStructures.ListNode{String}(mouse))
julia> next = iterate(animals, next[2])
("mouse", Error showing value of type Tuple{String,DataStructures.ListNode{String}}:
ERROR: UndefRefError: access to undefined reference
Stacktrace:
[1] getproperty at .\Base.jl:20 [inlined]
[2] show at C:\Users\User\.juliapro\JuliaPro_v1.2.0-1\packages\DataStructures\5F6tJ\src\mutable_list.jl:246 [inlined]
[3] show_delim_array(::IOContext{REPL.Terminals.TTYTerminal}, ::Tuple{String,DataStructures.ListNode{String}}, ::Char, ::Char, ::Char, ::Bool, ::Int64, ::Int64) at .\show.jl:712
[4] show_delim_array at .\show.jl:697 [inlined]
[5] show at .\show.jl:730 [inlined]
[6] show(::IOContext{REPL.Terminals.TTYTerminal}, ::MIME{Symbol("text/plain")}, ::Tuple{String,DataStructures.ListNode{String}}) at .\multimedia.jl:47
[7] display(::REPL.REPLDisplay, ::MIME{Symbol("text/plain")}, ::Any) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\REPL\src\REPL.jl:132
[8] display(::REPL.REPLDisplay, ::Any) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\REPL\src\REPL.jl:136
[9] display(::Any) at .\multimedia.jl:323
[10] #invokelatest#1 at .\essentials.jl:790 [inlined]
[11] invokelatest at .\essentials.jl:789 [inlined]
[12] print_response(::IO, ::Any, ::Bool, ::Bool, ::Any) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\REPL\src\REPL.jl:156
[13] print_response(::REPL.AbstractREPL, ::Any, ::Bool, ::Bool) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\REPL\src\REPL.jl:141
[14] (::getfield(REPL, Symbol("#do_respond#38")){Bool,getfield(Atom, Symbol("##176#177")),REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\REPL\src\REPL.jl:718
[15] #invokelatest#1 at .\essentials.jl:790 [inlined]
[16] invokelatest at .\essentials.jl:789 [inlined]
[17] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\REPL\src\LineEdit.jl:2306
[18] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\REPL\src\REPL.jl:1038
[19] run_repl(::REPL.AbstractREPL, ::Any) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\REPL\src\REPL.jl:201
[20] (::getfield(Base, Symbol("##737#739")){Bool,Bool,Bool,Bool})(::Module) at .\client.jl:390
[21] #invokelatest#1 at .\essentials.jl:790 [inlined]
[22] invokelatest at .\essentials.jl:789 [inlined]
[23] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at .\client.jl:374
[24] exec_options(::Base.JLOptions) at .\client.jl:312
[25] _start() at .\client.jl:464
julia>