Skip to content

Instantly share code, notes, and snippets.

@kartikshah
Created May 7, 2011 15:14
Show Gist options
  • Save kartikshah/960571 to your computer and use it in GitHub Desktop.
Save kartikshah/960571 to your computer and use it in GitHub Desktop.
Solution to 4clojure 21
;http://4clojure.com/problem/22
;count without using count
(#(loop [myseq % i 0]
(if (empty? myseq)
i
(recur (next myseq) (+ i 1))))
[1 2 3 4]) ; or provide any list arg here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment