keep is cool, thanks for showing me that :)

On Wednesday, May 21, 2014 2:35:50 AM UTC-5, Vesa Marttila wrote:
>
> On Wednesday, May 21, 2014 2:03:14 AM UTC+3, Brad Kurtz wrote:
>>
>> I saw a rant online about interviewing developers that mentioned 
>> candidates not being able to count the number of vowels in a string. So 
>> naturally, I decided to see if I could do it in Clojure!
>>
>> I wanted to see others' opinions on other ways of doing it.
>>
>> *https://gist.github.com/bradkurtz/6ce500d0361ccdc08c8e 
>> <https://gist.github.com/bradkurtz/6ce500d0361ccdc08c8e>*
>>
>
> Hi,
>
> I ended up with this: https://gist.github.com/ponzao/7399c08bb3b40d349289
>
>     (def vowels
>       #{\a \e \i \o \u})
>  
>     (defn count-vowels
>       [s]
>
>       (count (keep vowels (.toLowerCase s))))
>
> Vesa
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to