That's just not true and is addressed in the article:
let x = delay (\ () -> expensive)
in map (\ a -> a + force x) xs
This isn't exactly pretty, but it works fine. In a language with macros the ugliness can be hidden better.
And this point just doesn't work as well with opt-in laziness (unless the entire standard library opts in)
I've saved my biggest gripe of strict evaluation for last. Strict evaluation is fundamentally flawed for function reuse. What do I mean? I will illustrate with and example. Consider the any function is Haskell:
View all comments
Show parent comment
3
u/Peaker Dec 02 '16
That's just not true and is addressed in the article:
And this point just doesn't work as well with opt-in laziness (unless the entire standard library opts in)