I’m trying to implement the new iterate
interface in JLD.jl
, but I can’t get it to work, mostly because I don’t quite understand the original implementation.
I tried
Base.iterate(parent::Union{JldFile, JldGroup}, state) = state[2] < length(state[1]) ? nothing :
(parent[state[1][state[2]]], (state[1], state[2]+1))
but that did not work.