Clojure

Introduction

Clojure (pronounced like "closure") is a dialect of the Lisp programming language created by Rich Hickey. It is a functional general-purpose language. Its focus on programming with immutable values and explicit progression-of-time constructs are intended to facilitate the development of more robust programs, particularly multithreaded ones.

Clojure runs on the Java Virtual Machine, Common Language Runtime, and JavaScript engines. Like other Lisps, Clojure treats code as data and has a sophisticated macro system.

Usage

Compute Systems Invocation Version(s)
Red Hat Linux (64-bit) % cd /util/closure/
% java -cp clojure.jar clojure.main
1.2.1 (default)

Demo


~% cd /util/clojure
clojure% java -cp clojure.jar clojure.main
Clojure 1.2.1
user=> (+ 1 2 3)
6
user=> 
clojure%

Notes

  1. Exit clojure with CTRL-D.
  2. You may want to try the clojure build automation tool, Leiningen.

People

  1. Stuart Shapiro, instructor.

References

  1. http://en.wikipedia.org/wiki/Clojure
  2. http://clojure.org/