aboutsummaryrefslogtreecommitdiff
path: root/stdlib.slip
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-15 22:13:24 +0300
committerJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-15 22:13:24 +0300
commit1a38462fbefd58cc7aff98f28520152e37c5ae55 (patch)
treed168a4d53991bbd65c20f18bc2b92d39913d3830 /stdlib.slip
parent95e69fb5d1c3c47650c4df38d3fc62c7f0eed9c1 (diff)
downloadmyslip-1a38462fbefd58cc7aff98f28520152e37c5ae55.tar.gz
myslip-1a38462fbefd58cc7aff98f28520152e37c5ae55.zip
feat: standard library & loading it by default
Diffstat (limited to 'stdlib.slip')
-rw-r--r--stdlib.slip21
1 files changed, 21 insertions, 0 deletions
diff --git a/stdlib.slip b/stdlib.slip
new file mode 100644
index 0000000..9e20c64
--- /dev/null
+++ b/stdlib.slip
@@ -0,0 +1,21 @@
+(let if
+ (fn (cond iftrue iffalse) (Bool T T) T
+ (case cond
+ (true iftrue)
+ (_ iffalse))
+ )
+)
+
+
+(let ++
+ (fn x Int Int
+ (+ x 1)
+ )
+)
+
+
+(let --
+ (fn x Int Int
+ (- x 1)
+ )
+) \ No newline at end of file