IterTools.jl
IterTools.jl copied to clipboard
reverse iterators for Julia 0.7
Now that 0.7 has reverse iteration (https://github.com/JuliaLang/julia/pull/24187), it would be nice to support that in the IterTools iterators where it makes sense:
-
define
Iterators.reverse(itr::SomeIterType)
in cases where the reverse iterator is easily written in terms of some other iterator type. (e.g. ifitr
"wraps" around another iterator, just callIterators.reverse
on the "inner" iterator). -
define
start
/next
/done
methods forIterators.Reverse{SomeIterType}
in cases where you need a specialized iteration protocol.
For examples, see https://github.com/JuliaLang/julia/blob/master/base/iterators.jl