by jakestl · 12y ago · 0 comments
filter(lambda x: x%2==0, xrange(10))
Is this basically the same concept?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.