mirror of
https://github.com/anoma/juvix.git
synced 2024-12-15 01:52:11 +03:00
803d2008d9
* remove ≔ from the language and replace it by := * revert accidental changes in juvix input mode * update stdlib submodule * rename ℕ by Nat in the tests and examples * fix shell tests
18 lines
265 B
Plaintext
18 lines
265 B
Plaintext
module Data.Nat;
|
||
inductive ℕ {
|
||
zero : ℕ;
|
||
suc : ℕ → ℕ;
|
||
};
|
||
|
||
infixl 6 +;
|
||
+ : ℕ → ℕ → ℕ;
|
||
+ zero b := b;
|
||
+ (suc a) b := suc (a + b);
|
||
|
||
infixl 7 *;
|
||
* : ℕ → ℕ → ℕ;
|
||
* zero b := zero;
|
||
* (suc a) b := b + a * b;
|
||
|
||
end;
|