[Haskell-cafe] Slow IO or bad code?

Vimal j.vimal at gmail.com
Thu Aug 9 10:05:31 EDT 2007


@Donald:
Thanks for the link.

> prod = sum . zipWith (*)
>
> This is the slow part. Prelude.read ist really slow.
>
> Futhermore use the recusion pattern again:
> to_int = map read
>
> What is n used for?
@Lutz:
Those are some nice tricks... Thanks!
Now, the 'n' is for getting the number of numbers in the list. Which I
don't need, since I had a way around it. I just had to skip that
line...


More information about the Haskell-Cafe mailing list