Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save finitud/1739480 to your computer and use it in GitHub Desktop.
Save finitud/1739480 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