about summary refs log tree commit diff stats
path: root/shell/data.limg
diff options
context:
space:
mode:
Diffstat (limited to 'shell/data.limg')
-rw-r--r--shell/data.limg10
1 files changed, 10 insertions, 0 deletions
diff --git a/shell/data.limg b/shell/data.limg
index fac0e683..c85dd050 100644
--- a/shell/data.limg
+++ b/shell/data.limg
@@ -5,6 +5,16 @@
     (def . [(mac (def (name . params) . body)
   `(define ,name (fn ,params ,@body)))])
     (do . [(mac (do . body) `((fn () ,@body)))])
+    (list . [(def (list . args) args)])
+    (len . [(def (len l)
+  (if (no l)
+    0
+    (+ 1 (len (cdr l)))))])
+    (map1 . [(def (map1 f xs)
+  (if (no xs)
+    ()
+    (cons (f (car xs))
+          (map1 f (cdr xs)))))])
     (let . [(mac (let var val . body)
   `((fn (,var) ,@body) ,val))])
     (when . [(mac (when cond . body)