3 ms·
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 ba
by davedx 2y 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.
- kreyenborgi 2y agoor 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-in-haskell#:~:text=Rewrite%20rules https://stackoverflow.com/questions/38905369/what-is-fusion-...