mirror of
https://github.com/anoma/juvix.git
synced 2024-11-30 05:42:26 +03:00
18 lines
381 B
Plaintext
18 lines
381 B
Plaintext
-- Mutually recursive let expressions
|
|
module test039;
|
|
|
|
import Stdlib.Prelude open;
|
|
|
|
main : Nat :=
|
|
let
|
|
Ty : Type := Nat;
|
|
odd : _
|
|
| zero := false
|
|
| (suc n) := not (even n);
|
|
unused : _ := 123;
|
|
even : _
|
|
| zero := true
|
|
| (suc n) := not (odd n);
|
|
plusOne (n : Ty) : Ty := n + 1;
|
|
in ite (odd (plusOne 13)) 1 0 + ite (even (plusOne 12)) 1 0;
|