I tried
println [1.0, 1.25..2.0]
but got
Double is not an instance of Enum
I couldn't find this issue in the "differences to Haskell", though. Is there a recommended alternative?
I tried
println [1.0, 1.25..2.0]
but got
Double is not an instance of Enum
I couldn't find this issue in the "differences to Haskell", though. Is there a recommended alternative?
You're right that it should be in the "Differences".
For an alternative, consider
So, to get your list above, write:
It should also be possible to make
Double
andFloat
instances ofEnum
. There is simply lots of work to do in the field of numeric types and type classes.