Created
January 4, 2014 19:58
-
-
Save hindenbug/8259898 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; eg: symbols in clojure, points to a verb or other values | |
;; when clojure evaluates a symbol it looks up that symbols meaning | |
inc | |
;; refer to symbols without evaluating its meaning | |
;; ' escapes a expression. Quote anything and get it back exactly | |
;; the same | |
'inc | |
'"foo" | |
;; LISTS, surrounded by parantheses, LISP stood for LISt Processsing | |
;; List contain anything numbers, strings and even other lists | |
'(1 2 3) | |
'(nil "hi") | |
'(1 (2 (3 ()))) | |
;; combining symbols an number as list | |
'(inc 0) | |
;; Removing the ' evaluates the expression | |
(inc 0) | |
;; A sentence in LISP is a list | |
;; Every list starts with a verb and followed by zero or more objects to act on | |
;; Parts of list are evaluates left to right | |
;; Innermost List are evaluates before outer lists | |
(inc (inc 0)) | |
(+ 1 (- 2 6) (- 6 7)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment