[Haskell-cafe] I killed performance of my code with Eval and Strategies

Bas van Dijk v.dijk.bas at gmail.com
Thu Nov 15 02:07:58 CET 2012


On Nov 14, 2012 10:44 PM, "Janek S." <fremenzone at poczta.onet.pl> wrote:
> calculateSeq :: [Double] -> [Double]
> calculateSeq [] = []
> calculateSeq (x:xs) = (sin . sqrt $ x) : xs

Do you really mean to calculate the 'sin . sqrt' of just the head of the
list, or do you mean:

calculateSeq = map (sin . sqrt)   ?

Bas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121115/4d272e53/attachment.htm>


More information about the Haskell-Cafe mailing list