Lisp Part Two
Page content
History
Lisp Machines with Emacs
Clojure
Is a dialect of Lisp
lisp-journey.gitlab.io
Hirachical Structures
JavaScript vs. Lisp
[ "copy",
{
"todir" : "../new/dir"
"fileset" : [
{ "dir" : "src_dir" }
]
}
]
(copy
(todir "../new/dir")
(fileset (dir "src_dir")))i
Functions
cadr car cdr
’ everything after not evaluated
specialities of Common Lisp
Symbols can have multiple bindings
(set '= 42)
(symbol-function '=)
(symbol-value '=)
(symbol-plist '=)
(= = =)
Macros
evaluation of arguments is not always desired
(and 1 2 nil 3) ;;Arguments are evaluated from left to right, stops at nil
(if nil 1 2) ;;only one branch is evaluated
(defun f (n) (* 2 n)) ;;interpreted as definition of a function