user=> (try (Integer/parseInt "x") (catch Exception _ 0))
0
user=> (defmacro parse-int [a default] `(try (Integer/parseInt ~a)
(catch Except
ion _ ~default)))
#'user/parse-int
user=> (parse-int "x" 0)
java.lang.Exception: Can't bind qualified name:user/_ (NO_SOURCE_FILE:
0)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---