Hacker News new | ask | show | jobs
by davedx 607 days ago
That kind of thing really depends on the language. Some of the stronger functional languages like Haskell have lazy evaluation, so that operation won't be as bad as it looks. But then you really need to fully understand the tradeoffs of lazy evaluation too.
1 comments

or list fusion, but yes Haskell will optimise map x (map y lst) to map (x . y) lst

https://stackoverflow.com/questions/38905369/what-is-fusion-...