diff --git a/src/sixth-cursors-intro.md b/src/sixth-cursors-intro.md index b4522c0..73fb977 100644 --- a/src/sixth-cursors-intro.md +++ b/src/sixth-cursors-intro.md @@ -22,8 +22,8 @@ Hey, we already have iterators! Can we use them for this? Kind of... but one of ```rust ,ignore let mut list = ...; let iter = list.iter_mut(); -let elem1 = list.next(); -let elem2 = list.next(); +let elem1 = iter.next(); +let elem2 = iter.next(); if elem1 == elem2 { ... } ``` @@ -120,4 +120,4 @@ I have my quibbles with some of the terminology std uses, but cursors are always The std API talks about operations before "before" (towards the front) and "after" (towards the back), and instead of `next` and `next_back`, it... calls things `move_next` and `move_prev`. HRM. Ok so they're getting into a bit of the iterator terminology, but at least `next` doesn't evoke front/back, and helps you orient how things behave compared to the iterators. -We can work with this. \ No newline at end of file +We can work with this.