Created
January 20, 2015 13:32
-
-
Save uchida/a1613f7b74c42408f98e to your computer and use it in GitHub Desktop.
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
(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