Created
June 23, 2016 17:08
-
-
Save brianium/5f04ad45a3d5d2cbb8d10ca2104b13d7 to your computer and use it in GitHub Desktop.
This file contains 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
; roll your own nth function | |
; my super long version | |
(fn [coll n] | |
(loop [c coll count 0] | |
(if (= count n) | |
(first c) | |
(recur (next c) (inc count))))) | |
; some other dudes cooler version | |
#(first (drop %2 %1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment