2 ms·
You could (usually, but not always) compose the functions you're passing into filter and map and use reduce instead to do both operations in a single pass. (Ed
by sli 7y ago
You could (usually, but not always) compose the functions you're passing into filter and map and use reduce instead to do both operations in a single pass.
(Edit: This is a big point in the article -- apologies, I hadn't finished reading it yet.)