[Haskell-cafe] "computational time" always 0.0 in this example...

Bulat Ziganshin bulat.ziganshin at gmail.com
Thu Dec 7 10:46:14 EST 2006


Hello Lennart,

Thursday, December 7, 2006, 4:59:57 PM, you wrote:

> time $ product [1..1000] `seq` return ()
> instead of
> time $ doTest wordList2 wordList2 `seq` return ()
> works fine.

because 'product' returns just one value. use the following:

time $ (return $! last (doTest wordList2 wordList2))


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list