Last active
October 1, 2017 00:57
-
-
Save Modicrumb/2c7ddecb94a038f4d0e5e348a980bdc1 to your computer and use it in GitHub Desktop.
test.clj
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
(fn thenth [collection x] | |
(loop [ collection collection | |
x x | |
idx 0 | |
] | |
(if (first collection) | |
(if (= idx x) | |
(first collection) | |
) | |
(recur thenth [(rest collection) | |
x | |
(inc idx)] | |
) | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment