Skip to content

Commit

Permalink
ENH: iterate API to cycler
Browse files Browse the repository at this point in the history
  • Loading branch information
sglyon committed Sep 20, 2018
1 parent 194db18 commit d8bd587
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/styles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ function Base.getindex(c::Cycler, ixs::AbstractVector{<:Integer})
[c[i] for i in ixs]
end

Base.iterate(c::Cycler, s::Int=1) = c[s], s+1
Base.IteratorSize(::Cycler) = IsInfinite()

struct Style
layout::Layout
global_trace::PlotlyAttribute
Expand Down

0 comments on commit d8bd587

Please sign in to comment.