repositories
/
TD_LISP.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Add more TD code snippets
[TD_LISP.git]
/
functions.lsp
1
#!/usr/bin/env newlisp
2
3
; function addition
4
(define (f x y) (+ x y))
5
(println (f 1 2))
6
7
(define f (lambda (x y) (+ x y)))
8
(setq f (lambda (x y) (+ x y)))
9
;(set 'f (lambda (x y) (+ x y)))
10
(println (f 1 2))
11
(println ((lambda (x y) (+ x y)) 1 2))
12
13
(exit)