Skip to content
Snippets Groups Projects
Verified Commit 52f5cd49 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Fix iteration again

parent f8333d3e
No related branches found
No related tags found
1 merge request!36Make fitinf use 0-based indexing
......@@ -49,7 +49,7 @@ Base.firstindex(::FitInformation) = 0
Base.lastindex(fitinf::FitInformation) = length(fitinf) - 1
Base.eltype(::FitInformation) = Float64
function Base.iterate(fitinf::FitInformation, state=0)
state > length(fitinf)+1 ? nothing : (fitinf[state], state+1)
state > length(fitinf)-1 ? nothing : (fitinf[state], state+1)
end
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment