1
1
mirror of https://github.com/anoma/juvix.git synced 2025-01-07 08:08:44 +03:00
juvix/tests/positive/Internal/Mutual.juvix

25 lines
273 B
Plaintext
Raw Normal View History

2022-09-26 20:14:17 +03:00
module Mutual;
type Bool :=
true : Bool
| false : Bool;
2022-09-26 20:14:17 +03:00
type Nat :=
zero : Nat
| suc : Nat → Nat;
2022-09-26 20:14:17 +03:00
not : _;
not false := true;
not true := false;
2022-09-26 20:14:17 +03:00
odd : _;
even : _;
odd zero := false;
odd (suc n) := even n;
2022-09-26 20:14:17 +03:00
even zero := true;
even (suc n) := odd n;
2022-09-26 20:14:17 +03:00
end;