(head . map f) xs = (f . head) xs
It works for every xs list when f is strict. Can anyone give me example, why with non-strict f it doesnt work?
(head . map f) xs = (f . head) xs
It works for every xs list when f is strict. Can anyone give me example, why with non-strict f it doesnt work?
Copyright © 2021 Jogjafile Inc.
Let's take the non-strict function
f = const ()
, andxs = undefined
. In this case, we havebut
and so
but
Q.E.D.