Version 1: Just need that running

```
struct ReverseDigitsIterator
num::Int
end
Base.eltype(x::ReverseDigitsIterator) = Int
Base.iterate(x::ReverseDigitsIterator) = reverse(divrem(x.num,10))
function Base.iterate(x::ReverseDigitsIterator, state::Int)
state==0 && return nothing
return reverse(divrem(state,10))
end
Base.IteratorSize(::Type{<:ReverseDigitsIterator}) = Base.SizeUnknown()
```

Version 2: More types (e.g. BigInt) & length prediction

```
struct ReverseDigitsIterator{T<:Integer}
num::T
end
Base.eltype(x::ReverseDigitsIterator{T}) where T = T
Base.iterate(x::ReverseDigitsIterator) = reverse(divrem(x.num,10))
function Base.iterate(x::ReverseDigitsIterator{T}, state::T) where T
state==0 && return nothing
return reverse(divrem(state,10))
end
Base.length(x::ReverseDigitsIterator) = ndigits(x.num)
```

Version 3: Screw it, I want arbitrary Int base aswell!

```
struct ReverseDigitsIterator{T<:Integer, B}
num::T
ReverseDigitsIterator(val::T, base::Int=10) where T = new{T, base}(val)
end
Base.eltype(x::ReverseDigitsIterator{T}) where T = T
Base.iterate(x::ReverseDigitsIterator{T,B}) where {T,B} = reverse(divrem(x.num,B))
function Base.iterate(x::ReverseDigitsIterator{T,B}, state::T) where {T,B}
state==0 && return nothing
return reverse(divrem(state,B))
end
Base.length(x::ReverseDigitsIterator{T,B}) where {T,B} = ndigits(x.num, base=B)
```