How do you actually find out *how* to use an interface in Julia, like the concept of iterator "end"?

If you would have defined the iteration condition like for i in 1:10 then i==10 will be the iteration end condition.

See that iterate(iter, state) == nothing is the condition for iteration end.
May be this post can be of help Understanding iterate() documentation is tough.

1 Like