@@ -2138,7 +2138,7 @@ pub trait Iterator {
2138
2138
/// where I: Iterator,
2139
2139
/// I::Item: Ord,
2140
2140
/// {
2141
- /// iter.fold_first (|a, b| {
2141
+ /// iter.reduce (|a, b| {
2142
2142
/// if a >= b { a } else { b }
2143
2143
/// })
2144
2144
/// }
@@ -2150,7 +2150,7 @@ pub trait Iterator {
2150
2150
/// ```
2151
2151
#[ inline]
2152
2152
#[ unstable( feature = "iterator_fold_self" , issue = "68125" ) ]
2153
- fn fold_first < F > ( mut self , f : F ) -> Option < Self :: Item >
2153
+ fn reduce < F > ( mut self , f : F ) -> Option < Self :: Item >
2154
2154
where
2155
2155
Self : Sized ,
2156
2156
F : FnMut ( Self :: Item , Self :: Item ) -> Self :: Item ,
@@ -2647,7 +2647,7 @@ pub trait Iterator {
2647
2647
move |x, y| cmp:: max_by ( x, y, & mut compare)
2648
2648
}
2649
2649
2650
- self . fold_first ( fold ( compare) )
2650
+ self . reduce ( fold ( compare) )
2651
2651
}
2652
2652
2653
2653
/// Returns the element that gives the minimum value from the
@@ -2707,7 +2707,7 @@ pub trait Iterator {
2707
2707
move |x, y| cmp:: min_by ( x, y, & mut compare)
2708
2708
}
2709
2709
2710
- self . fold_first ( fold ( compare) )
2710
+ self . reduce ( fold ( compare) )
2711
2711
}
2712
2712
2713
2713
/// Reverses an iterator's direction.
0 commit comments