Having some fun
This commit is contained in:
10
test.lispbm
Normal file
10
test.lispbm
Normal file
@ -0,0 +1,10 @@
|
||||
(defun fac (x)
|
||||
(match x
|
||||
(0 1)
|
||||
(1 1)
|
||||
(_ (* x (fac (- x 1))))))
|
||||
|
||||
(defun mymap (f m)
|
||||
(if (eq m nil)
|
||||
nil
|
||||
(cons (f (car m)) (mymap m f))))
|
||||
Reference in New Issue
Block a user