Collection of Lisp family language snippets including Common Lisp, Scheme, and Clojure. Topics Common Lisp Essentials - Common Lisp basics and useful patterns Scheme Essentials - Scheme programming fundamentals Clojure Essentials - Clojure for JVM development
Read MoreBasic Syntax 1; Comments start with semicolon 2 3;; Variables 4(define x 42) 5(define pi 3.14159) 6 7;; Functions 8(define (square x) 9 (* x x)) 10 11(define (factorial n) 12 (if (<= n 1) 13 1 14 (* n (factorial (- n 1))))) 15 16;; Lambda 17(lambda (x) (* x x)) 18((lambda (x) (* x x)) 5) ; => 25 19 20;; Let …
Read More