On 12 April 2011 22:04, Joost <jo...@zeekat.nl> wrote: > For now, I think of the pretzel library as the lowest useful level of > abstraction for input tests. And for low level abstractions, I prefer > to place a higher value on correctness, extensibility, consistency and > possibly even performance (in roughly that order) than ease of use > from a direct programmer's stand point.
I think I agree. > It might be better to put those predicates in a numeric > namespace or library that doesn't address strings at all, maybe > relying on a conversion layer somewhere if your input is really string- > based, or maybe to have string-based counterparts relying on the > numeric tests. That's a good idea. Perhaps something like: (defn from-string [f] (comp f parse-number)) (from-string (in-range 1 10)) But with a better name than "from-string". - James -- 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