List.partition a bit too eager

George Russell
Fri, 22 Dec 2000 16:56:41 +0100

I think the following program

import List
main = putStr . show . fst . (partition id) . cycle $ [True,False]

should display [True,True,True,...].  But instead, for both GHC and Hugs,
you get a stack overflow.  Is this a bug, or could someone explain it to me?