standardizing indentation

This commit is contained in:
Colin Jones 2010-07-26 18:20:42 -05:00
parent 2cf40290b9
commit 927212f253
3 changed files with 36 additions and 36 deletions

View File

@ -1,9 +1,9 @@
(meditations
"We shall contemplate truth by testing reality, via equality."
(= __ true)
"We shall contemplate truth by testing reality, via equality."
(= __ true)
"To understand reality, we must compare our expectations against reality."
(= __ (+ 1 1))
"To understand reality, we must compare our expectations against reality."
(= __ (+ 1 1))
"You can test equality of many things"
(= (+ 3 4) __ (+ 2 __)))
"You can test equality of many things"
(= (+ 3 4) __ (+ 2 __)))

View File

@ -1,16 +1,16 @@
(meditations
"Sets are another important data structure in clojure"
(= #{} (set nil))
"Sets are another important data structure in clojure"
(= #{} (set nil))
"Remember that a set is a 'set'"
(= __ (set '(1 1 2 2 3 3 4 4 5 5)))
"Remember that a set is a 'set'"
(= __ (set '(1 1 2 2 3 3 4 4 5 5)))
"You can ask clojure for the union of two sets"
(= __ (clojure.set/union #{1 2 3 4} #{2 3 5}))
"You can ask clojure for the union of two sets"
(= __ (clojure.set/union #{1 2 3 4} #{2 3 5}))
"And also the intersection"
(= __ (clojure.set/intersection #{1 2 3 4} #{2 3 5}))
"And also the intersection"
(= __ (clojure.set/intersection #{1 2 3 4} #{2 3 5}))
"But don't forget about the difference"
(= __ (clojure.set/difference #{1 2 3 4 5} #{2 3 5})))
"But don't forget about the difference"
(= __ (clojure.set/difference #{1 2 3 4 5} #{2 3 5})))

View File

@ -1,27 +1,27 @@
(meditations
"You can use vectors in clojure to create an 'Array' like structure"
(= __ (.size (vec nil)))
"You can use vectors in clojure to create an 'Array' like structure"
(= __ (.size (vec nil)))
"You can create a vector in two ways"
(= [] (vec nil))
"You can create a vector in two ways"
(= [] (vec nil))
"And populate it in either of these ways"
(= [1] (vec '(1)))
"But you can populate it with any number of elements at once"
(= [1 __] (vec '(1 2)))
"And add to it as well"
(= __ (conj (vec nil) 333))
"And populate it in either of these ways"
(= [1] (vec '(1)))
"You can get the first element of a vector like so"
(= :peanut (first [:peanut :butter :and :jelly]))
"But you can populate it with any number of elements at once"
(= [1 __] (vec '(1 2)))
"And the last in a similar fashion"
(= __ (last [:peanut :butter :and :jelly]))
"And add to it as well"
(= __ (conj (vec nil) 333))
"Or any index if you wish"
(= __ (nth [:peanut :butter :and :jelly] 3))
"You can get the first element of a vector like so"
(= :peanut (first [:peanut :butter :and :jelly]))
"You can also slice a vector"
(= __ (subvec [:peanut :butter :and :jelly] 1 3)))
"And the last in a similar fashion"
(= __ (last [:peanut :butter :and :jelly]))
"Or any index if you wish"
(= __ (nth [:peanut :butter :and :jelly] 3))
"You can also slice a vector"
(= __ (subvec [:peanut :butter :and :jelly] 1 3)))