Forked from anonymous/finitud-4clojure-solution21.clj
Created
February 4, 2012 18:56
-
-
Save finitud/1739475 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
;; finitud's solution to Nth Element | |
;; https://4clojure.com/problem/21 | |
(fn [x n] | |
(if (= n 0) (first x) | |
(recur (rest x) (- n 1)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment