PR Stanley: > or = foldl (||) False > and = foldl (&&) True > [...] > Other than the practical convenience is there a reason for having the > empty list in and and or equating to True and False?
It might help to think of "and" as a kind of product, and "or" as a kind of sum, and note that: sum [] = 0 product [] = 1 If it seems odd that the product of an empty list should be 1, then consider why x^0 = 1 for any x /= 0, and so on. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
