DEV Community


Discussion on: We Don't Need No Stinking map() or filter()

jdsteinhauser profile image
Jason Steinhauser Author

In JavaScript, there would be a slight performance hit if you used reduce to perform a map operation because of returning an array each time. However, immutable data structures in other languages (like Clojure's vector) would not really see a performance hit because of how they are stored. You've given me an idea on a follow up post to discuss immutability and lazy vs. eager evaluation. Thanks for the feedback!

manelescuer profile image
Manel Escuer García

Thank you!