Skip to content

Instantly share code, notes, and snippets.

@uchida
Created January 20, 2015 13:32
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 uchida/a1613f7b74c42408f98e to your computer and use it in GitHub Desktop.
Save uchida/a1613f7b74c42408f98e to your computer and use it in GitHub Desktop.
(defn access [array & idxs]
(loop [i (first idxs)
idxs (rest idxs)
ret array]
(if i
(recur (first idxs) (rest idxs) (get ret i))
ret)))
(access [[0 1 2]] 0 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment