#329
Associative destructuring 1
 

Difficulty:Easy
Topics:destructuring


de-structuring these data into chunk or pieces helps you find or use the data you need. Read on Destructuring
test not run
(= '("0 Ipsum left" "1 Lorem right" "2 Dolor left")
   (map 
    (fn [mydata]
      (let [{text :text pos :pos idx :idx} mydata]
        (str idx " " text " " pos)))
    __))
test not run
(= '("0 Ipsum left" "1 Lorem right" "2 Dolor left")
   (map 
    (fn [{:keys [text pos idx]}]
      (str idx " " text " " pos))
    __))


Code which fills in the blank: