
27 Sep
2011
27 Sep
'11
1:34 p.m.
Iavor Diatchki
last ([0.1, 0.2 .. 0.5]) == 0.5 False
last (map fromRational [0.1, 0.2 .. 0.5]) == 0.5 True
As Ross pointed out in a previous e-mail the instance for Rationals is also broken:
last (map fromRational [1,3 .. 20]) 21.0
But only because it tries to mimic the behavior of Float/Double, I think. Rational could easily have produced 19 here. -k -- If I haven't seen further, it is by standing in the footprints of giants