From ac4a2ca577974ed38f22ee7b363aaa8516e37127 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Fri, 1 Jul 2016 11:31:50 -0500 Subject: [PATCH] Revert "Speed up iteration with numbers" This reverts commit 526695c40b538951a234fc1168344a481c67a438. Jeff's fix to codegen on Bools, #17225, should make this unnecessary. --- base/number.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/number.jl b/base/number.jl index ab33caf0ebd25..218c883e5f2d4 100644 --- a/base/number.jl +++ b/base/number.jl @@ -50,9 +50,9 @@ angle(z::Real) = atan2(zero(z), z) widemul(x::Number, y::Number) = widen(x)*widen(y) -start(x::Number) = 0 # see #16687 -next(x::Number, state) = (x, state+1) -done(x::Number, state) = state == 1 +start(x::Number) = false +next(x::Number, state) = (x, true) +done(x::Number, state) = state isempty(x::Number) = false in(x::Number, y::Number) = x == y