Iterator-based `linspace` and `logspace` functions