2 ms·
The fact of un-readability isn’t necessarily implied by the statement being replied to. `map` and `filter` are names for common operations on lists, not less pe
by ughitsaaron 3y ago
The fact of un-readability isn’t necessarily implied by the statement being replied to. `map` and `filter` are names for common operations on lists, not less performant alternatives other things. If there’s a more performant alternative to either operation, give it a name and express it in a function. That’s what functions are for, no?
- pleoxy 3y agoThe biggest problem is that map, filter make copies of the structure. That's an allocation, that means GC calls. You can make a similar function that changes the data in place and will be faster. But that comes with side effects which is not functional style.