On Feb 17, 2011, at 1:36 PM, Mike Meyer wrote: > My turn... > > (defn to-digits > "Create a seq of digits from a number." > [i] > ^{:user/comment "For Euler Problems (Specifically 16)"} > (map {\0 0 \1 1 \2 2 \3 3 \4 4 \5 5 \6 6 \7 7 \8 8 \9 9} > (str i))) > > No assumption about representation here. But my Python background is > showing - Pythons dictionaries are used *everywhere* in the language, > and hence tuned as tightly as possible and thus blasted fast.
Why not use Character/digit, as Saul suggested? -- 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