X-Git-Url: https://git.piment-noir.org/?p=TD_LISP.git;a=blobdiff_plain;f=functions.lsp;fp=functions.lsp;h=79c4c556c7ed5bc28e258ea7f588eb5c2b4eef17;hp=0000000000000000000000000000000000000000;hb=b610b3081e928e5b67a5b03704f899f0411ba317;hpb=679ae8f3a1de255be56edd9ac79370d15d59378b diff --git a/functions.lsp b/functions.lsp new file mode 100755 index 0000000..79c4c55 --- /dev/null +++ b/functions.lsp @@ -0,0 +1,13 @@ +#!/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)