[CLJ-1310] some-> behaves differently than -> when used with macros Created: 19/Dec/13 Updated: 19/Dec/13 Resolved: 19/Dec/13
|Affects Version/s:||Release 1.5|
I stumbled across a behavior of some-> when used with macros, and I'm wondering whether it's expected.
I started with something like this:
Then I realized that quux might throw an exception, which I want to ignore, so had the possibly misguided idea to do this:
(defmacro catch->nil [& body]
My mental model of some-> is that it should end up wrapping the whole expression in a try-catch, as
Certainly easy to work around, now that I know about it, but I thought perhaps this was not intended.
|Comment by Chris Perkins [ 19/Dec/13 7:34 PM ]|
After a little reflection, I realize that my mental model of some-> as "thread-first plus magic fairy-dust" is fatally flawed. I withdraw my objections. Please disregard.
|Comment by Alex Miller [ 19/Dec/13 7:50 PM ]|
withdrawn by submitter