27 Aug
2007
27 Aug
'07
7:34 a.m.
2007/8/26, Yitzchak Gale <gale@sefer.org>:
True, that is not the problem.
Using length forces the result to be Int, which is different than all of the other tm's so far. So for example, try this:
[n | n <- [0..25], tm_silly n /= tm n]
You mean to say that tm_silly returns Int, which means we can't use it directly in a comparison but have to use toInteger or fromInteger ? Ok, in this case, but it's still a nice test for our more optimized functions (and using genericLength is much slower than toInteger . length, though of course the results differ for really long list) $> [n | n <- [1..1000], toInteger (tm_silly n) /= tm n] [] -- Jedaï