--- /dev/null
+#!/usr/bin/env newlisp
+
+; function addition
+;(define (f x y) (+ x y))
+;(println (f 1 2))
+
+;(define f (lambda (x y) (+ x y)))
+(setq f (lambda (x y) (+ x y)))
+;(set 'f (lambda (x y) (+ x y)))
+(println (f 1 2))
+(println ((lambda (x y) (+ x y)) 1 2))
+
+(println (let ((x 1) (y 2)) (+ x y)))
+(println ((lambda (x y) (+ x y)) 1 2))
+
+(setq x 3 y 4)
+(println "x="x" y="y)
+(println ((lambda (y) (setq x 5 y 6) (+ x y)) 1 2))
+(println "x="x" y="y)
+
+(exit)
--- /dev/null
+#!/usr/bin/env newlisp
+
+(define (f x y) (+ x y z))
+;(lambda (x y) (+ x y z))
+(println (first f))
+(println (last f))
+(setq z 2)
+(println (f 1 3))
+
+(setf (nth 1 f) '(+ x y z 1))
+(println (f 1 3))
+
+(println (let ((z 2)) (expand f 'z)))
+
+(exit)
--- /dev/null
+#!/usr/bin/env newlisp
+
+(println (map eval '((+ 1) (+ 1 2 3) 11)))
+;(println (list (+ 1) (+ 1 2 3) 11))
+
+(println (map string? '(1 "Hello" 2 " World!")))
+
+(println (map + '(1 2 3 4) '(4 5 6 7) '(8 9 10 11)))
+
+; fn = lambda
+(println (map (fn (x) (= 0 (% x 2))) '(1 2 3 4)))
+
+(println (filter (fn (x) (= 0 (% x 2))) '(1 2 3 4)))
+
+(println (index (fn (x) (= 0 (% x 2))) '(1 2 3 4)))
+
+(println (apply + '(1 2 3)))
+
+(exit)
+++ /dev/null
-#!/usr/bin/env newlisp
-
-; function addition
-(define (f x y) (+ x y))
-(println (f 1 2))
-
-(define f (lambda (x y) (+ x y)))
-(setq f (lambda (x y) (+ x y)))
-;(set 'f (lambda (x y) (+ x y)))
-(println (f 1 2))
-(println ((lambda (x y) (+ x y)) 1 2))
-
-(exit)