Upgrade to Clojure 1.3.0-alpha1.
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
(defn raise-to-the-tenth-power [n]
|
||||
(Math/pow n 10))
|
||||
(defn multiply-by-ten [n]
|
||||
(* 10 n))
|
||||
|
||||
(meditations
|
||||
"Functions are often defined before they are used"
|
||||
(= __ (raise-to-the-tenth-power 2))
|
||||
(= __ (multiply-by-ten 2))
|
||||
|
||||
"But they can also be defined inline"
|
||||
(= __ ((fn [n] (Math/pow n __)) 2))
|
||||
(= __ ((fn [n] (* __ n)) 2))
|
||||
|
||||
"Or using even shorter syntax"
|
||||
(= __ (#(Math/pow % 10) __))
|
||||
(= __ (#(* 15 %) __))
|
||||
|
||||
"One function can beget another"
|
||||
(= __ ((fn []
|
||||
|
@@ -47,9 +47,9 @@
|
||||
1 "\"January\""
|
||||
2006 2010 2014
|
||||
"\"Vancouver\""]}
|
||||
"functions" {"__" [1024
|
||||
32 5
|
||||
1024 2
|
||||
"functions" {"__" [20
|
||||
10 5
|
||||
30 2
|
||||
20 "*"]
|
||||
"___" ["(fn [f] (f 5))"]}
|
||||
"conditionals" {"__" [:a
|
||||
|
@@ -1,5 +1,6 @@
|
||||
(ns path-to-enlightenment
|
||||
(:use clojure.test))
|
||||
(:use [clojure.test])
|
||||
(:require [clojure.set]))
|
||||
|
||||
(def __ nil)
|
||||
(def ___ (fn [& args] nil))
|
||||
|
Reference in New Issue
Block a user