/Prelude-v21.1.0/Natural/toInteger.dhall

Copy path to clipboard

Convert a Natural number to the corresponding Integer

Examples

toInteger 3 ≡ +3
toInteger 0 ≡ +0

Source

--| Convert a `Natural` number to the corresponding `Integer`
let toInteger
: Natural → Integer
= Natural/toInteger

let example0 = assert : toInteger 3 ≡ +3

let example1 = assert : toInteger 0 ≡ +0

in toInteger