@@ -515,8 +515,44 @@ pub trait Iterator {
515515 /// assert_eq!((2, 'o'), zipper[2]);
516516 /// ```
517517 ///
518+ /// If both iterators have roughly equivalent syntax, it may me more readable to use [`zip`]:
519+ ///
520+ /// ```
521+ /// use std::iter::zip;
522+ ///
523+ /// let a = [1, 2, 3];
524+ /// let b = [2, 3, 4];
525+ ///
526+ /// let mut zipped = zip(
527+ /// a.into_iter().map(|x| x * 2).skip(1),
528+ /// b.into_iter().map(|x| x * 2).skip(1),
529+ /// );
530+ ///
531+ /// assert_eq!(zipped.next(), Some((4, 6)));
532+ /// assert_eq!(zipped.next(), Some((6, 8)));
533+ /// assert_eq!(zipped.next(), None);
534+ /// ```
535+ ///
536+ /// compared to:
537+ ///
538+ /// ```
539+ /// # let a = [1, 2, 3];
540+ /// # let b = [2, 3, 4];
541+ /// #
542+ /// let mut zipped = a
543+ /// .into_iter()
544+ /// .map(|x| x * 2)
545+ /// .skip(1)
546+ /// .zip(b.into_iter().map(|x| x * 2).skip(1));
547+ /// #
548+ /// # assert_eq!(zipped.next(), Some((4, 6)));
549+ /// # assert_eq!(zipped.next(), Some((6, 8)));
550+ /// # assert_eq!(zipped.next(), None);
551+ /// ```
552+ ///
518553 /// [`enumerate`]: Iterator::enumerate
519554 /// [`next`]: Iterator::next
555+ /// [`zip`]: crate::iter::zip
520556 #[ inline]
521557 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
522558 fn zip < U > ( self , other : U ) -> Zip < Self , U :: IntoIter >
0 commit comments