[Haskell-cafe] Terminology: different levels of strictness

Yves Parès yves.pares at gmail.com
Fri Jan 27 16:13:54 CET 2012

If I consider the functions head, length, elem & sum, each is of them is
strict, as:
head/length/elem x/sum _|_ are always _|_.

head (x:_|_) is never _|_.
length [_|_, _|_, _|_ ...] is also never _|_.
elem x [4,5,6,8,2,90,_|_,_|_ ...] is *only sometimes *_|_ (depending on x
In fact, only
sum [4,5,6,8,2,90,_|_,_|_ ...] is always _|_.

Which shows they don't have the same level of strictness.

So can you say things like "all these functions are strict, but some are *more
*than other", or "sum is *deeply strict*" ...?
What terms can you use to compare those functions?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120127/5e67c9b6/attachment.htm>

More information about the Haskell-Cafe mailing list