aboutsummaryrefslogtreecommitdiffstats
path: root/examples/test.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/test.lisp')
-rw-r--r--examples/test.lisp26
1 files changed, 15 insertions, 11 deletions
diff --git a/examples/test.lisp b/examples/test.lisp
index b41007d..3b9fa5e 100644
--- a/examples/test.lisp
+++ b/examples/test.lisp
@@ -1,11 +1,15 @@
-(sum2 1 (
- sum2 2 3
-)) ; test1
-;; (sum2 ; test2
-;; 1
-;; 2 )
-;; "string with space"
-;; "another \n\"string\""
-;; (let id
-;; (\[a] a))
-(\[x] (\[y] (sum2 x y))) \ No newline at end of file
+;; (let map (\[f lst]
+;; (match lst
+;; [] []
+;; (prepend (f head lst) (map f (tail lst))))))
+
+;; (map (+ 1) [1 2 3])
+
+(let mapinc (\[vec]
+ (match vec
+ [] []
+ (prepend
+ (+ 1 (head vec))
+ (mapinc (tail vec))))))
+(env)
+(mapinc [1 2 3])