mirror of
https://github.com/anoma/juvix.git
synced 2024-12-01 00:04:58 +03:00
3fbc9c7c55
Closes #1644 #1635
20 lines
354 B
Plaintext
20 lines
354 B
Plaintext
module Ord;
|
||
|
||
import Data.Nat;
|
||
open Data.Nat;
|
||
|
||
type Ord :=
|
||
ZOrd : Ord |
|
||
SOrd : Ord -> Ord |
|
||
Lim : (ℕ -> Ord) -> Ord;
|
||
|
||
addord : Ord -> Ord -> Ord;
|
||
aux-addord : (ℕ -> Ord) -> Ord -> (ℕ -> Ord);
|
||
|
||
addord (Zord) y := y;
|
||
addord (SOrd x) y := SOrd (addord x y);
|
||
addord (Lim f) y := Lim (aux-addord f y);
|
||
aux-addord f y z := addord (f z) y;
|
||
|
||
end;
|