Recently, I began to study Elm. When I saw the type Int, I assumed that it was something like Haskell Int, which (I think) is an integer.
But I was surprised to see this:
> Result.withDefault 0 <| String.toInt "-"
NaN : Int
NaN- A floating-point concept that does not seem to apply to integers. It looks like it could be a leak from JS, which implies that it Intappears to be JS Number.
This is true? Why was this design decision made, and where can I find out about it?
(In addition, two minor questions:
)
source
share