diff options
| author | Arnaud Bailly <arnaud.bailly@iohk.io> | 2024-09-29 12:56:20 +0200 |
|---|---|---|
| committer | Arnaud Bailly <arnaud.bailly@iohk.io> | 2024-09-29 12:56:20 +0200 |
| commit | 9dcff1ea1b11f765f074d9b93e67bc6760f52049 (patch) | |
| tree | 31ed6a7be49d534466f11cc11422af492b360d21 /rust/sample/test_nat.txt | |
| parent | 04261b4798a73118f5266801fca9bf3d7ca95bdf (diff) | |
| download | lambda-nantes-9dcff1ea1b11f765f074d9b93e67bc6760f52049.tar.gz | |
More sample basic lambda terms
Diffstat (limited to 'rust/sample/test_nat.txt')
| -rw-r--r-- | rust/sample/test_nat.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rust/sample/test_nat.txt b/rust/sample/test_nat.txt new file mode 100644 index 0000000..81a6e9d --- /dev/null +++ b/rust/sample/test_nat.txt @@ -0,0 +1,9 @@ +(def pair (lam (a b f) (f a b))) +(def fst (lam p (p (lam (a b) a)))) +(def snd (lam p (p (lam (a b) b)))) + +(def zero (lam (f s) s)) +(def succ (lam (n f s) (f (n f s)))) + +(def is-zero (lam n + (n (lam x False) true))) |
