Alan,
Your with-default fn is neat. So it appears there's no
idiomatic/built-in clojure fn/macro to do parsing and wrapper functions such
as follow would be needed to avoid typing the whole expression every time.
(def parse-double (with-default #(Double. %) 0.0))
(def parse-int (with-default #(Integer. %) 0))
...
Thanks,
siyu
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en