Is there an easy way to change the eltype of ranges?

Here’s what map does:

julia> map(Float32, r)
2.0f0:1.0f0:3.0f0

julia> map(identity, r)
2-element Vector{Float64}:
 2.0
 3.0

julia> map(Int, r)
2-element Vector{Int64}:
 2
 3
1 Like