Iterators.Stateful
tries to determine the type of the (value, state)
tuple using internal introspection tools. This can be complicated if the type of state
keeps changing across iterations, and in such cases the inferred type of the (value, state)
tuple defaults to Any
. However, in my case, I do know the type of value
, although the state
might as well be Any
. This knowledge of the type of the value helps with type-inference downstream. However, I don’t see a constructor that lets one specify the type of the value, which is also essentially the eltype
of the iterator. Would it make sense to add one such constructor?