This FAQ says that
The seq operator is
seq :: a -> b -> b
x
seq
y will evaluate x, enough to chec
The seq
function will discard the value of x
, but since the value has been evaluated, all references to x
are "updated" to no longer point to the unevaluated version of x
, but to instead point to the evaluated version. So, even though seq
evaluates and discards x
, the value has been evaluated for other users of x
as well, leading to no repeated evaluations.