Using iterators instead (in stan::math::exp)