Standardize whitespace a bit more.
This commit is contained in:
parent
a395f47b86
commit
ae28d1dd98
@ -11,6 +11,7 @@
|
||||
false
|
||||
6/3
|
||||
3]}
|
||||
|
||||
"lists" {"__" [1 2 3 4 5
|
||||
1
|
||||
[2 3 4 5]
|
||||
@ -21,6 +22,7 @@
|
||||
[:b :c :d :e]
|
||||
"No dice!"
|
||||
()]}
|
||||
|
||||
"vectors" {"__" [1
|
||||
[]
|
||||
[1]
|
||||
@ -32,11 +34,13 @@
|
||||
:jelly
|
||||
[:butter :and]
|
||||
3]}
|
||||
|
||||
"sets" {"__" [3
|
||||
#{1 2 3 4 5}
|
||||
#{1 2 3 4 5}
|
||||
#{2 3}
|
||||
#{1 4}]}
|
||||
|
||||
"maps" {"__" [0
|
||||
1
|
||||
2
|
||||
@ -52,6 +56,7 @@
|
||||
1 "January"
|
||||
2006 2010 2014
|
||||
"Vancouver"]}
|
||||
|
||||
"functions" {"__" [20
|
||||
10 5
|
||||
30 2
|
||||
@ -59,12 +64,14 @@
|
||||
20 '*]
|
||||
"___" ['(fn [f] (f 5))
|
||||
'(fn [f] (f 5))]}
|
||||
|
||||
"conditionals" {"__" [:a
|
||||
[]
|
||||
0
|
||||
:glory
|
||||
4 6 :your_road
|
||||
''doom 0 ]}
|
||||
|
||||
"higher_order_functions" {"__" [4 8 12
|
||||
'(* x x)
|
||||
[false false true false false]
|
||||
@ -75,18 +82,21 @@
|
||||
24
|
||||
100
|
||||
'(count a) '(count b)]}
|
||||
|
||||
"runtime_polymorphism" {"__" ['(str (:name a) " eats veggies.")
|
||||
'(str (:name a) " eats animals.")
|
||||
'(str "I don't know what " (:name a) " eats.")
|
||||
"Hello World!"
|
||||
"Hello, you silly world."
|
||||
"Hello to this group: Peter, Paul, Mary!" ]}
|
||||
|
||||
"sequence_comprehensions" {"__" [[0 1 2 3 4 5]
|
||||
'(* index index)
|
||||
'(range 10)
|
||||
'(odd? index) '(* index index)
|
||||
'[row column]
|
||||
]}
|
||||
|
||||
"creating_functions" {"__" [true false true
|
||||
4
|
||||
:a :b :c :d
|
||||
@ -96,12 +106,14 @@
|
||||
"___" ['(complement nil?)
|
||||
'multiply-by-5
|
||||
'(comp dec square)]}
|
||||
|
||||
"recursion" {"__" [true 'acc
|
||||
'(loop [n n acc 1]
|
||||
(if (zero? n)
|
||||
acc
|
||||
(recur (dec n) (* acc n))))]
|
||||
"___" ['not]}
|
||||
|
||||
"destructuring" {"__" [":bar:foo"
|
||||
'(format (str "First comes %s, "
|
||||
"then comes %s, "
|
||||
@ -141,6 +153,7 @@
|
||||
''(+ 9 1)
|
||||
''(* 10 2)
|
||||
''(+ 10 (2 * 3))]}
|
||||
|
||||
"datatypes" {"__" ['(print
|
||||
(str "You're really the "
|
||||
(.category this)
|
||||
@ -150,9 +163,8 @@
|
||||
"physics"
|
||||
nil
|
||||
[true false]
|
||||
"Congratulations on your Best Picture Oscar, Evil Alien Conquerors!"
|
||||
]}
|
||||
})
|
||||
(str "Congratulations on your Best Picture Oscar, "
|
||||
"Evil Alien Conquerors!")]}})
|
||||
|
||||
(defn replace-with [s k replacements]
|
||||
(let [unreplaced-texts (split s (re-pattern (str "\\b" k "\\b")))]
|
||||
|
Loading…
Reference in New Issue
Block a user