Skip to content

Instantly share code, notes, and snippets.

Created February 4, 2012 18:55
Show Gist options
  • Save anonymous/1739470 to your computer and use it in GitHub Desktop.
Save anonymous/1739470 to your computer and use it in GitHub Desktop.
;; finitud's solution to Count a Sequence
;; https://4clojure.com/problem/22
(fn [x]
((fn [x n]
(if (= (rest x) ())
n
(recur (rest x) (+ n 1)))
)
x 1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment