ansible/dhall/Prelude/Natural/toDouble.dhall
2024-11-26 00:55:56 -05:00

10 lines
266 B
Text

--| Convert a `Natural` number to the corresponding `Double`
let toDouble
: Natural → Double
= λ(n : Natural) → Integer/toDouble (Natural/toInteger n)
let example0 = assert : toDouble 3 ≡ 3.0
let example1 = assert : toDouble 0 ≡ 0.0
in toDouble