3 ms·
I imagine part of the reason is because Java has the idiomatic usage of list.stream().functionalOperations.collect(Collectors.toList()) whereas in Haskell you
by cole-k 5y ago
I imagine part of the reason is because Java has the idiomatic usage of
list.stream().functionalOperations.collect(Collectors.toList())
whereas in Haskell you can just do whatever on your lists and it should fuse... or so I thought. Clearly I don't know too much about which way is the "right way" in Haskell since I haven't used Control.Foldl before and I just sort of assumed fusion would happen at least for most list operations.