'any' and 'all' compared with the rest of the Report

Sven Panne Sven.Panne@informatik.uni-muenchen.de
Tue, 23 Jan 2001 23:45:12 +0100


I wrote:
> [...]
>    ghc -O generates basically the following code (use -ddump-simpl to
>    see this):
> 
>       any :: (a -> Bool) -> [a] -> Bool
>       any p xs = let go ys = case ys of

Ooops, cut'n'paste error: Insert
                                  []     -> False
here.  :-}


>                                 (z:zs) -> case p z of
>                                              False -> go zs
>                                              True  -> True
>                  in go xs
> [...]

Cheers,
   Sven