diff options
| author | Arnaud Bailly <arnaud.bailly@iohk.io> | 2025-01-25 10:45:41 +0100 |
|---|---|---|
| committer | Arnaud Bailly <arnaud.bailly@iohk.io> | 2025-01-25 10:45:41 +0100 |
| commit | 7752d73216578d5961751b5d0535088d384b4aa6 (patch) | |
| tree | 786e46fe1276e93ade0a48398cd4c9ac13081707 /lambda-calcul/rust/sample/test_nat.txt | |
| parent | d6f68e919db51d366c8ca3c1509bea12aa81d692 (diff) | |
| download | lambda-nantes-7752d73216578d5961751b5d0535088d384b4aa6.tar.gz | |
Move λ-calcul workshop code to subdirectory
Diffstat (limited to 'lambda-calcul/rust/sample/test_nat.txt')
| -rw-r--r-- | lambda-calcul/rust/sample/test_nat.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lambda-calcul/rust/sample/test_nat.txt b/lambda-calcul/rust/sample/test_nat.txt new file mode 100644 index 0000000..81a6e9d --- /dev/null +++ b/lambda-calcul/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))) |
