[Haskell-cafe] ghc has problems with 'zipWith' ?

Tomasz Zielonka tomasz.zielonka at gmail.com
Wed Dec 8 04:22:48 EST 2004


On Tue, Dec 07, 2004 at 06:44:33PM +0100, Daniel Fischer wrote:
> 
> ms :: [Integer] -> [Integer]
> ms as = zipWith (+) (zipWith (*) as (1:ms as)) (0:1:ms as)

This version seems to be faster, but I don't know if it addresses your 
concern:

  ms as = let l = zipWith (+) (zipWith (*) as (1:l)) (0:1:l) in l

Best regards,
Tomasz


More information about the Haskell-Cafe mailing list