File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,10 @@ to_css_size(s::Real) = "$(s)px"
22
22
struct IteratorAndFirst{F, T}
23
23
first:: F
24
24
source:: T
25
- IteratorAndFirst (x) = new (iterate (x), x)
25
+ function IteratorAndFirst (x)
26
+ first = iterate (x)
27
+ return new {typeof(first), typeof(x)} (first, x)
28
+ end
26
29
end
27
30
Base. IteratorSize (:: Type{IteratorAndFirst{F, T}} ) where {F, T} = Base. IteratorSize (T)
28
31
Base. length (x:: IteratorAndFirst ) = length (x. source)
@@ -31,7 +34,7 @@ Base.eltype(x::IteratorAndFirst) = eltype(x.source)
31
34
Base. iterate (x:: IteratorAndFirst ) = x. first
32
35
function Base. iterate (x:: IteratorAndFirst , st)
33
36
st === nothing && return nothing
34
- return iterate (x. source)
37
+ return iterate (x. source, st )
35
38
end
36
39
37
40
function showtable (table; dark = false , height = :auto , width = " 100%" )
You can’t perform that action at this time.
0 commit comments