Commit 0fa4f0b
authored
Rollup merge of rust-lang#86415 - Kmeakin:iterator-associativity-docs, r=dtolnay
Document associativity of iterator folds.
Document the associativity of `Iterator::fold` and
`DoubleEndedIterator::rfold` and add examples demonstrating this.
Add links to direct users to the fold of the opposite associativity.2 files changed
+29
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
251 | 256 | | |
252 | 257 | | |
253 | 258 | | |
| |||
262 | 267 | | |
263 | 268 | | |
264 | 269 | | |
265 | | - | |
| 270 | + | |
| 271 | + | |
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
| |||
276 | 282 | | |
277 | 283 | | |
278 | 284 | | |
| 285 | + | |
279 | 286 | | |
280 | 287 | | |
281 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2083 | 2083 | | |
2084 | 2084 | | |
2085 | 2085 | | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
2086 | 2091 | | |
2087 | 2092 | | |
2088 | 2093 | | |
| |||
2116 | 2121 | | |
2117 | 2122 | | |
2118 | 2123 | | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
2119 | 2139 | | |
2120 | 2140 | | |
2121 | 2141 | | |
| |||
2140 | 2160 | | |
2141 | 2161 | | |
2142 | 2162 | | |
2143 | | - | |
| 2163 | + | |
2144 | 2164 | | |
2145 | 2165 | | |
2146 | 2166 | | |
| |||
0 commit comments