Created
May 7, 2011 15:14
-
-
Save kartikshah/960571 to your computer and use it in GitHub Desktop.
Solution to 4clojure 21
This file contains hidden or 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
;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