summaryrefslogtreecommitdiff
path: root/examples/nq/util.sin
diff options
context:
space:
mode:
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]]]