about summary refs log tree commit diff
path: root/tests/examples/bools-and-t-f.lam
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2023-04-14 23:46:53 +0300
committertzlil <tzlils@protonmail.com>2023-04-14 23:46:53 +0300
commitfdf35536b66499884dd5b4e1740ac67e5cebb1a2 (patch)
treeb907edf782ebb58780d7fbfed084560626b94c74 /tests/examples/bools-and-t-f.lam
add homework material
Diffstat (limited to 'tests/examples/bools-and-t-f.lam')
-rw-r--r--tests/examples/bools-and-t-f.lam16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/examples/bools-and-t-f.lam b/tests/examples/bools-and-t-f.lam
new file mode 100644
index 0000000..fd9a29c
--- /dev/null
+++ b/tests/examples/bools-and-t-f.lam
@@ -0,0 +1,16 @@
+(\ true false and or not .
+
+    and true false
+
+    -- Should reduce to false, i.e., \ x y . y
+)
+-- true
+(\ x y . x)
+-- false
+(\ x y . y)
+-- and
+(\ p q . p q p)
+-- or
+(\ p q . p p q)
+-- not
+(\ p x y . p y x)