Last active
January 21, 2016 20:54
-
-
Save kopasetik/a21be245464a47e91384 to your computer and use it in GitHub Desktop.
Clojure destructuring and elision
This file contains hidden or 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
| (def jokers-challenge ["Robin!" "Nana" "nana" "nana" "nana" "Batman!"]) | |
| ; elision AKA destructuring that skips vector items | |
| (let [[b _ _ _ _ a] jokers-challenge] | |
| (println a) | |
| (println b)) | |
| ;=> Batman! | |
| ;=> Robin! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment