Git - code.swisschili.sh
code.swisschili.sh
/
bluejay
/
15f1caee9d71a13069ce1cfa652e4767b1c4c189
/
.
/
src
/
lisp
/
test-closures.lisp
blob: 573024d5d0d2f7238eb0176acfe18fe91dc53e1f [
file
] [
log
] [
blame
]
(
defun
mapcar
(
func list
)
(
if
list
(
cons
(
apply func
(
list
(
car
list
)))
(
mapcar func
(
cdr
list
)))
nil
))
(
defun
double
(
n
)
(
+
n n
))
(
defun
main
(
)
(
print
(
mapcar
#
'double
(
list
1
2
3
4
5
))))