I think it is possible to define a type-stable iterator but it will need a special trick as Base.Generator does. Core.Inference.return_type can infer the return type as follows:
julia> Core.Inference.return_type(first, Tuple{typeof(2x for x in 1:10)})
Int64
I’m not a maintainer of IterTools.jl but it would be better to open an issue there.
All that’s needed is to define iteratoreltype(::Type{<:IMap}) = EltypeUnknown()! collect is pretty good at figuring out what the container type should be.