Skip to content

Instantly share code, notes, and snippets.

@kopasetik
Last active January 21, 2016 20:54
Show Gist options
  • Save kopasetik/a21be245464a47e91384 to your computer and use it in GitHub Desktop.
Save kopasetik/a21be245464a47e91384 to your computer and use it in GitHub Desktop.
Clojure destructuring and elision
(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