summaryrefslogtreecommitdiff
path: root/examples/nq/util.sin
diff options
context:
space:
mode:
authorTom Harley2020-01-08 14:14:39 +0000
committerTom Harley2020-01-08 14:14:39 +0000
commit4cdc57ce8041aecabd3175f2dff176b115f17724 (patch)
treeda9a25e2d18ce5f4415d4c61441962e9e06ee727 /examples/nq/util.sin
parentcheckpoint (diff)
downloadsinter-4cdc57ce8041aecabd3175f2dff176b115f17724.tar.gz
sinter-4cdc57ce8041aecabd3175f2dff176b115f17724.zip

I should commit more

Diffstat (limited to 'examples/nq/util.sin')
-rw-r--r--examples/nq/util.sin15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/nq/util.sin b/examples/nq/util.sin
new file mode 100644
index 0000000..20cf3c4
--- /dev/null
+++ b/examples/nq/util.sin
@@ -0,0 +1,15 @@
+[def not [x]
+ [if x
+ 0
+ 1]]
+
+[def and [x y]
+ [if x
+ y
+ 0]]
+
+[def != [x y]
+ [- x y]]
+
+[def = [x y]
+ [not [!= x y]]]