Re: `as-` does not work with `recur`.

2014-10-05 Thread Jan-Paul Bultmann
Ah thanks, I did a JIRA search for `as-` before but nothing had popped up. On 05 Oct 2014, at 03:06, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: This issue has been reported May be you should upvote this.. http://dev.clojure.org/jira/browse/CLJ-1418 On Sun, Oct 5, 2014

`as-` does not work with `recur`.

2014-10-04 Thread Jan-Paul Bultmann
Hey, I just noticed that while recur can be the last statement in most threading macros, it can't be used within an `as-` macro. user= (macroexpand '(- x (recur))) (recur x) user= (macroexpand '(as- x % (recur %))) (let* [% x % (recur %)] %) This means that a recur within a `as-` will

Re: `as-` does not work with `recur`.

2014-10-04 Thread Leon Grapenthin
Thought: (defmacro as- [expr name forms] `(let [~name ~expr ~@(interleave (repeat name) (butlast forms))] ~(last forms))) On Sunday, October 5, 2014 1:02:50 AM UTC+2, Jan-Paul Bultmann wrote: Hey, I just noticed that while recur can be the last

Re: `as-` does not work with `recur`.

2014-10-04 Thread Sunil S Nandihalli
This issue has been reported May be you should upvote this.. http://dev.clojure.org/jira/browse/CLJ-1418 On Sun, Oct 5, 2014 at 4:56 AM, Leon Grapenthin grapenthinl...@gmail.com wrote: Thought: (defmacro as- [expr name forms] `(let [~name ~expr