[Haskell-cafe] Accumulator value for "and" and "or"

PR Stanley prstanley at ntlworld.com
Thu Sep 20 22:48:25 EDT 2007


Hi
or = foldl (||) False
and = foldl (&&) True
I can understand the rationale for the accumulator value - True && [] 
where [] = True and True || [] where [] = False
Other than the practical convenience is there a reason for having the 
empty list in and and or equating to True and False?
Thanks, Paul



More information about the Haskell-Cafe mailing list