|
|
|
|
|
by siddboots
4272 days ago
|
|
Essentially, yes. The performance benefit that transducers provide can also be obtained by using iterator versions of map, reduce, and filter. Unlike those traditional functions, however, transducer versions are composable. So I can put a whole bunch of maps, reducers, and filters in a row, and assign that composition to a variable. Then I can apply that composition to any type of collection and know that it only requires one pass. |
|