Update answer sheet for ClojureBridge-MN changes

This commit is contained in:
Colin Jones 2015-07-06 07:28:21 -05:00
parent 37cc4ce04a
commit b1ea905c57
2 changed files with 10 additions and 11 deletions

View File

@ -6,8 +6,8 @@
true
true
false
"foo"
"foo"
"hello"
"hello"
3]}]
["02_lists" {"__" [1 2 3 4 5
@ -74,8 +74,8 @@
:glory
4 6 :your-road
1
:cocked-pistol
:say-what?]}]
:bicycling
"is that even exercise?"]}]
["08_higher_order_functions" {"__" [4 8 12
(* x x)
@ -135,9 +135,9 @@
"___" [not]}]
["14_destructuring" {"__" [":bar:foo"
(format (str "First comes %s, "
"then comes %s, "
"then comes %s with the baby carriage")
(format (str "An Oxford comma list of %s, "
"%s, "
"and %s.")
a b c)
(apply str
(interpose " "
@ -214,9 +214,9 @@
{5 ["hello" "world"] 3 ["foo" "bar"]}
{1 [{:name "Bob" :id 1}
{:last-name "Smith" :id 1}]
2 [{:name "Mike" :id 2}]}
2 [{:name "Jennifer" :id 2}]}
nil
{:naughty-list [{:name "Jimmy" :bad true}
{:name "Joe" :bad true}]
:nice-list [{:name "Jack" :bad false}]}]}]
:nice-list [{:name "Jane" :bad false}]}]}]
]

View File

@ -10,7 +10,6 @@
"To categorize a collection by some function, use group-by."
(= __ (group-by count ["hello" "world" "foo" "bar"]))
"You can simulate filter + remove in one pass"
(= (get-odds-and-evens [1 2 3 4 5])
((juxt filter remove) odd? [1 2 3 4 5])
@ -34,5 +33,5 @@
(= __
(group-by #(if (:bad %) :naughty-list :nice-list)
[{:name "Jimmy" :bad true}
{:name "Anna" :bad false}
{:name "Jane" :bad false}
{:name "Joe" :bad true}])))