Added lisp along with some study work

This commit is contained in:
2017-06-23 02:16:42 -07:00
parent 0523d93916
commit 0d49347cb7
10 changed files with 496 additions and 0 deletions

View File

@ -0,0 +1,30 @@
;; List of variables that are surrounded by parens
(let ((a 5)
(b 6))
(+ a b))
;; Local functions
;; It's like let. A list of functions and their descriptions,
;; followed by some stuff to do with them
(flet ((function_name (args)
...Function Body...))
body)
;;example
(flet ((f (n)
(+ n 10)))
(f 5))
>> 15
;; labels -- like flet, but allow functions to call other
;; defined functions or themselves
;; Same basic structure as flet
(labels ((a (n)
(+ n 5))
(b (n)
(+ (a n) 6)))
(b 10))
>> 21