On Fri, Feb 4, 2011 at 12:05, B Smith-Mannschott <[email protected]>wrote:
> I came up with this macro, but I'm unsure what to call it:
>
> (defmacro thread-let [[varname init-expression :as binding] & expressions]
> {:pre [(symbol? varname)
> (not (namespace varname))
> (vector? binding)
> (= 2 (count binding))]}
> `(let [~@(interleave (repeat varname) (cons init-expression expressions))]
> ~varname))
>
>
Hah, you have been working on one of my frustrations! Thanks!
I like (thread-with sym & forms)
--
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