Touch up some grammar & wording

master
Colin Jones 11 years ago
parent 5dcf46a6b4
commit 7ab93a0c38

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

@ -1,15 +1,15 @@
(meditations
"There are a wide range of ways to generate a sequence"
"There are many ways to generate a sequence"
(= __ (range 1 5))
"The range starts at the beginning by default"
(= __ (range 5))
"It's important to only take what you need from a big sequence"
"Only take what you need when the sequence is large"
(= [0 1 2 3 4 5 6 7 8 9]
(take __ (range 100)))
"You can also limit results by dropping what you don't need"
"Or limit results by dropping what you don't need"
(= [95 96 97 98 99]
(drop __ (range 100)))

@ -17,16 +17,17 @@
(for [index __ :when (odd? index)]
index))
"And they trivially allow combinations of the two transformations"
"Combinations these transformations is trivial"
(= '(1 9 25 49 81)
(map (fn [index] (* index index))
(filter odd? (range 10)))
(for [index (range 10) :when __]
__))
"More complex transformations can be formed with multiple binding forms"
"More complex transformations simply take multiple binding forms"
(= [[:top :left] [:top :middle] [:top :right]
[:middle :left] [:middle :middle] [:middle :right]
[:bottom :left] [:bottom :middle] [:bottom :right]]
(for [row [:top :middle :bottom] column [:left :middle :right]]
(for [row [:top :middle :bottom]
column [:left :middle :right]]
__)))

@ -2,7 +2,7 @@
"To split a collection you can use the partition function"
(= '((0 1) (2 3)) (__ 2 (range 4)))
"But watch out if there is not enough elements to form n sequences"
"But watch out if there are not enough elements to form n sequences"
(= '(__) (partition 3 [:a :b :c :d :e]))
"You can use partition-all to also get partitions with less then n elements"

Loading…
Cancel
Save