mirror of
https://github.com/anoma/juvix.git
synced 2024-12-13 11:16:48 +03:00
16 lines
225 B
Plaintext
16 lines
225 B
Plaintext
|
module Nat;
|
||
|
type Bool :=
|
||
|
| true : Bool
|
||
|
| false : Bool;
|
||
|
|
||
|
type Nat :=
|
||
|
| zero : Nat
|
||
|
| suc : Nat → Nat;
|
||
|
|
||
|
is-zero : Nat → Bool;
|
||
|
is-zero n :=
|
||
|
case n
|
||
|
| zero := true
|
||
|
| suc _ := false;
|
||
|
end;
|