user=> (reduce (fn [s [old new]] (.replace s old new)) "abcd" [["a" "b"]
["b" "c"] ["c" "d"]])"dddd"
user=>


2010/10/15 Paul <paul_bow...@yahoo.com>

> Hi all,
>
> I need to perform string replacement a number of times and currently
> achieve this using:
>
> (.replace (.replace (.replace (.replace <string> <old> <new>...
>
> Is there a more succinct and 'clojurish' way to do this?
>
> Thanks,
>
> P.
>
> --
> 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<clojure%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

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

Reply via email to