Commit e6c3008
committed
small iter.intersperse.fold() optimization
No need to call into fold when the first item is already None,
this avoids some redundant work for empty iterators.
"But it uses Fuse" one might want to protest, but Fuse is specialized
and may call into the inner iterator anyway.1 parent 75e7cf5 commit e6c3008
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
227 | 236 | | |
228 | 237 | | |
229 | 238 | | |
| |||
0 commit comments