dhall-nix-lib/Number/toInteger.dhall

10 lines
244 B
Text
Raw Normal View History

2022-08-31 17:51:53 +00:00
λ(nix : ../NixPrelude.dhall) →
let Number = ./Type.dhall
let Number/nonPositive = ./nonPositive.dhall nix
in λ(a : Number) →
if Number/nonPositive a
then nix.builtins.ceil a
else nix.builtins.floor a