I have two versions of a function to count leading hash(#) characters, which is better?
===

I wrote a piece of code to count the leading hash(#) character of a line, which is much like a heading line in `Markdown`
<pre>
### Line one          -> return 3
######## Line two     -> return 6 (Only care about the first 6 characters.
</pre>
**Version 1**

    (defn
      count-leading-hash
      [line]
      (let [cnt (count (take-while #(= % \#) line))]
        (if (> cnt 6) 6 cnt)))

**Version 2**

    (defn
      count-leading-hash
      [line]
      (loop [cnt 0]
        (if (and (= (.charAt line cnt) \#) (< cnt 6))
          (recur (inc cnt))
          cnt)))
        
I used `time` to measure both tow implementations, found that the first version based on `take-while` is 2x faster than version 2. Taken `"###### Line one"` as input, version 1 took *0.09 msecs*, version 2 took about *0.19 msecs*.

**Question 1. Is it `recur` that slows down the second implementation?**

**Question 2. Version 1 is closer to functional programming paradigm , is it?**

**Question 3. Which one do you prefer? Why?** (You're welcome to write your own implementation.)
