JuliaLang/julia — pull request #9182 by nolta (2014-11-27 20:47:50+00:00)
Title: WIP: split next into nextval & nextstate

This is a more speculative and breaking fix for #9178. It splits `next` into `nextval` and `nextstate`, as previously discussed in #6125.

For example,

```julia
for x in xs
...
```

would transform into

```julia
iter = start(xs)
while !done(xs,iter)
x = nextval(xs,iter)
...
iter = nextstate(xs,iter)
```