On Tue, Oct 21, 2008 at 11:31 AM, mb <[EMAIL PROTECTED]> wrote:
>
> (xxx-> "Hello" (apply str <> [", " "World!"])) gives "Hello, World!".
>
> The <> is used to mark the "hole" where the value is to be inserted.

I wrote something like this too.  I called mine >>_ and used _ as the
insert mark.

Here's my implementation:

(defmacro >>_ [& exprs]
  (list 'let (apply vector (mapcat (fn [expr] (list '_ expr)) exprs)) '_ ))

user=> (>>_ "Hello" (apply str _ [", " "World!"]))
"Hello, World!"

I used it a couple times after first writing it, but have since failed
to find much use for it.  I guess I wouldn't really recommend it.

--Chouser

--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to