aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorMarvin Borner2024-11-27 16:18:16 +0100
committerMarvin Borner2024-11-27 16:18:16 +0100
commit02ff39d0ab6488fa8cedb31030130b352e10b3e2 (patch)
tree2fef90f83699831d13dea768e144430e1f60a7a2 /samples
parent91d52159a5ac32165dca0edfaf75a19845156551 (diff)
Initial typingHEADmain
Diffstat (limited to 'samples')
-rw-r--r--samples/logic.mili14
1 files changed, 14 insertions, 0 deletions
diff --git a/samples/logic.mili b/samples/logic.mili
new file mode 100644
index 0000000..ce6470c
--- /dev/null
+++ b/samples/logic.mili
@@ -0,0 +1,14 @@
+-- garbage collection hack
+gc = [0 [0] [0] [0]]
+
+true = [[[0 2 1]]]
+false = [[[0 1 2]]]
+
+not = [[[2 0 1]]]
+
+and = [[1 0 false [[gc 0 1]]]]
+nand = [[not (and 1 0)]]
+or = [[1 true 0 [[gc 0 1]]]]
+nor = [[not (or 1 0)]]
+
+([0] <0>)