Clojure

Tuesday 24th of November 2009 09:15:16 AM


  Toggle Advanced Options



Clojure

Clojure vs. Lisp

Note: examples based on Essential Lisp - John R. Anderson, Albert T. Corbett and Brian J. Reiser

Basics

Function calls: arithmetic functions

Lisp examples

(+ 8 12 3) => 23
(- 12 4) => 8
(* 4 3) => 12 
(/ 12 3) => 3

Clojure examples

(+ 8 12 3) => 23
(- 12 4) => 8
(* 4 3) => 12 
(/ 12 3) => 3
Combining functions

Pending...

Atoms and lists

Pending...

List functions

Pending...

Extracting information from lists

Pending...

Building lists

Lisp examples

(cons (car '(cat dog fox)) (cdr '(cat dog fox))) => (cat dog fox)

Defining functions

Pending...

Predicates and conditionals

Pending...

Input and output

Pending...

Loops

Pending...

Basic recursion

Pending...

Advanced recursion

Pending...

List iteration

Pending...

Advanced iterative constructs

Pending...

More-complex data structures

Pending...

Evaluation and macros

Pending...

Search techniques

Pending...







Google