Skip to content

Instantly share code, notes, and snippets.

@orb
Created September 13, 2016 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orb/82667cac8d52bf246340e164e7bad573 to your computer and use it in GitHub Desktop.
Save orb/82667cac8d52bf246340e164e7bad573 to your computer and use it in GitHub Desktop.
user> (defn try-it [ & [x & xs :as all-of-them]]
all-of-them)
#'user/try-it
user> (try-it 1 2 3 4 5)
(1 2 3 4 5)
user> (defn try-it [ & [x & xs :as all-of-them]]
x)
#'user/try-it
user> (try-it 1 2 3 4 5)
1
user> (defn try-it [ & [x & xs :as all-of-them]]
xs)
#'user/try-it
user> (try-it 1 2 3 4 5)
(2 3 4 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment