3 ms·
Strange, but unsurprising after seeing the examples, IMO. Knowing that the memory spike in Haskell is due to the strict form of foldl (as indicated by the tick)
by boomlinde 7y ago
Strange, but unsurprising after seeing the examples, IMO. Knowing that the memory spike in Haskell is due to the strict form of foldl (as indicated by the tick) only being strict up to "weak head normal form" seems quite a bit more esoteric to me.
But maybe I am biased due to learning more about how computer implementations fundamentally operate (in which case the only surprising thing about a[b] == b[a] is that the C standard allows it) than FP theory and how that abstraction can be baked down into something that the computer can actually execute efficiently.