3 ms·
It's a similar idea to map() but for more complex objects than arrays. When people use "map" in Javascript (or most any other language that supports it) do they
by BoiledCabbage 11mo ago
It's a similar idea to map() but for more complex objects than arrays. When people use "map" in Javascript (or most any other language that supports it) do they do so because "they are terrified of mutability, and are willing to abandon performance?"
Your comment reads like the response of someone who is struggling to understand a concept.
- o11c 11mo agoOnly the get half is `map`-like. In combination it's more like a property descriptor, which is far easier to understand and much more efficient. And, if it wasn't obvious, it's only the `set` half where lenses suck for performance.