Created
June 26, 2020 08:51
-
-
Save tgk/099c6e1708f57e165fa139e730a89295 to your computer and use it in GitHub Desktop.
Alternative to load-object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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