# Base.next?

**URL:** <https://discourse.julialang.org/t/base-next/16534>\
**Category:** General Usage\
**Created:** [October 19, 2018, 3:33pm UTC](https://discourse.julialang.org/t/base-next/16534 "2018-10-19T15:33:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qiyamah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qiyamah/32/2660_2.png) [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Post date:** [October 19, 2018, 3:33pm UTC](https://discourse.julialang.org/t/base-next/16534/1 "2018-10-19T15:33:26Z")

</div>

My code was written with Base.next and now it is not working with 1.0  
Where can I learn the latest iterator interface and what I need to change.

Thanks

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [October 19, 2018, 3:38pm UTC](https://discourse.julialang.org/t/base-next/16534/2 "2018-10-19T15:38:24Z")

</div>

Docs can be found [here](https://docs.julialang.org/en/v1/manual/interfaces/#man-interface-iteration-1).

You’ll want to use `iterate` instead.

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [October 19, 2018, 3:40pm UTC](https://discourse.julialang.org/t/base-next/16534/3 "2018-10-19T15:40:28Z")

</div>

Also,

> [@PSA: use Julia 0.7 if you are upgrading](https://discourse.julialang.org/t/psa-use-julia-0-7-if-you-are-upgrading/13321):
>
> A lot of people are posting issues where their old code doesn’t work anymore on 1.0 because some function has been renamed or removed. The 0.7 release exists exactly for this reason: your old code will work on 0.7 and give you a specific warning about how to fix your code. If you have any old code, you should use 0.7 to get these warnings before switching to 1.0; even if you just have work habits that may need changing, you should probably use 0.7 for a while. If someone posts an issue like thi…

---

<div class="post-metadata">

**Author:** ![mforets](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mforets/32/298_2.png) [@mforets](https://discourse.julialang.org/u/mforets)\
**Post date:** [October 19, 2018, 4:01pm UTC](https://discourse.julialang.org/t/base-next/16534/4 "2018-10-19T16:01:32Z")

</div>

see also: [Writing Iterators in Julia 0.7](https://julialang.org/blog/2018/07/iterators-in-julia-0.7)

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [October 19, 2018, 9:21pm UTC](https://discourse.julialang.org/t/base-next/16534/5 "2018-10-19T21:21:29Z")

</div>

Usually you don’t want to explicitly call the next or iterate functions. Just use a for loop instead.

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [October 19, 2018, 9:21pm UTC](https://discourse.julialang.org/t/base-next/16534/6 "2018-10-19T21:21:58Z")

</div>

Ah, unless you’re defining an iterable type of course, sorry.
