mirror of
https://github.com/anoma/juvix.git
synced 2024-12-11 08:25:46 +03:00
3b3ea45da9
* Renaming MiniJuvix to Juvix * Make Ormolu happy * Make Hlint happy * Remove redundant imports * Fix shell tests and add target ci to our Makefile * Make pre-commit happy
21 lines
359 B
Plaintext
21 lines
359 B
Plaintext
module Ord;
|
||
|
||
import Data.Nat;
|
||
open Data.Nat;
|
||
|
||
inductive 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;
|