25 lines
584 B
Text
25 lines
584 B
Text
λ(nix : ../NixPrelude.dhall) →
|
|
let Number = ./Type.dhall
|
|
|
|
let add = ./add.dhall nix
|
|
|
|
let negate = ./negate.dhall nix
|
|
|
|
let divide = ./divide.dhall nix
|
|
|
|
let fromNatural = ./fromNatural.dhall nix
|
|
|
|
let succ = λ(n : Number) → add n (fromNatural 1)
|
|
|
|
let build =
|
|
λ ( builder
|
|
: ∀(number : Type) →
|
|
(number → number) →
|
|
(number → number) →
|
|
(number → number → number) →
|
|
number →
|
|
number
|
|
) →
|
|
builder Number succ negate divide (fromNatural 0)
|
|
|
|
in build
|