
19 Oct
2016
19 Oct
'16
7:21 p.m.
Sorry I must be a bit tired :) On 10/19/2016 09:16 PM, Silvio Frischknecht wrote:
Hi,
I don't claim to know the real reason. But I can see that it would make some things more stable or rather it makes the stable versions look nicer.
[1,1.1 .. 2] looks better than [1,1.1 .. 2.05]
If you define it like you suggest
numericEnumFromThenTo e1 e2 e3 = takeWhile (<=e1) [e2, e3 ..] :: [Float] numericEnumFromThenTo e1 e2 e3 = takeWhile (<=e3) [e1, e2 ..] :: [Float]
I get
length $ numericEnumFromThenTo 1 1.1 2 === 10 length $ numericEnumFromThenTo 2 1.2 3 === 11 length $ numericEnumFromThenTo 2 2.1 3 == 11
Cheers, Silvio