Skip to content

Instantly share code, notes, and snippets.

@tgk
Created Jun 26, 2020
Embed
What would you like to do?
Alternative to load-object
;; alternative strategy for navigating maps
(def rental-ad {:id 42, :car_id 56, :name_and_model "Peugeot 208"})
(follow rental-ad :name_and_model)
;; => "Peugeot 208"
(follow rental-ad :car)
;; => {:user_id 3, :car_type_id 5}
(follow rental-ad :car :user :name)
;; => "Thomas"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment