fixed some weird formatting that happened

This commit is contained in:
pfarwick-latacora 2021-06-15 17:40:51 -05:00
parent a6b2c04394
commit 2ce29b835d

View file

@ -71,7 +71,6 @@
(sr/select [:cars :ford (sr/multi-path :focus :expedition) __] car-inventory)) (sr/select [:cars :ford (sr/multi-path :focus :expedition) __] car-inventory))
"multi-path was cool, but imagine if you had 100 keys in the multi-path, that would be terrible "multi-path was cool, but imagine if you had 100 keys in the multi-path, that would be terrible
let's see if we can get there with MAP-VALS"
let's see if we can get all the :ford cars with MAP-VALS" let's see if we can get all the :ford cars with MAP-VALS"
(= [{:doors 2 :color "red"} {:doors 2 :color "blue"} {:doors 4 :color "red"} {:doors 4 :color "black"}] (= [{:doors 2 :color "red"} {:doors 2 :color "blue"} {:doors 4 :color "red"} {:doors 4 :color "black"}]
(sr/select [__ __ sr/MAP-VALS __] car-inventory)) (sr/select [__ __ sr/MAP-VALS __] car-inventory))
@ -118,8 +117,10 @@
2. change the color of the expedition to orange to try to sell that faster as well" 2. change the color of the expedition to orange to try to sell that faster as well"
;; TODO using placeholder for the thread macro doesn't play nice w/ the meditate macro (can this be fixed?) ;; TODO using placeholder for the thread macro doesn't play nice w/ the meditate macro (can this be fixed?)
;; TODO: add two entries to the expected vec ;; TODO: add two entries to the expected vec
(= {:cars {:ford {:expedition [{:doors 4, :color "orange"} {:doors 4, :color "orange"}]}}} (= {:cars {:ford {:expedition [{:doors 4, :color "orange"}]}}}
(->> car-inventory-ford (___ car-inventory-ford
(sr/setval [:cars :ford :focus] ___)
(sr/setval [:cars :ford :expedition sr/ALL :color] __)))
"Transform also takes a map and returns a map "Transform also takes a map and returns a map
The format of transform is (sr/transform path function map) The format of transform is (sr/transform path function map)
@ -169,7 +170,3 @@
;; TODO exercise to remove maps that contain keys w/ specific strings ;; TODO exercise to remove maps that contain keys w/ specific strings
) )