thaks everyone!

-sun


On Feb 12, 11:59 am, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> Hello,
>
> one solution : java API to the rescue :
>
> (defn digits [s] (apply str (filter #(Character/isDigit %) s)))
>
> or
>
> (def digits (comp (partial apply str) (partial filter #(Character/isDigit
> %))))
>
> if you prefer a more haskellish form :-)
>
> 2009/2/12 wubbie <sunj...@gmail.com>
>
>
>
> > Hello,
>
> > How can I do this? Do we have a function that checks if
> > it's a char or digit?
>
> > (digits "a2c3")
> > -> "23"
>
> > Thanks,
> > sun
>
> --
> Cordialement,
>
> Laurent PETIT
--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to