Hello!

On Tue, Jan 23, 2001 at 11:10:53PM +0100, Sven Panne wrote:
> [...]

> <TotallyUnbiasedAd>
>    Given
> 
>       or = foldr (||) False
>       any p = or . map p

>    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
>                                 (z:zs) -> case p z of
>                                              False -> go zs
>                                              True  -> True
>                  in go xs

Mental note: I should really upgrade GHC. I'm however a bit afraid about
ghc-current, as I'm on a non-ELF arch.

> [...]

Kind regards,

Hannah.

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to