I feel like the type hints should be left out until you really need them, since they kind of clobber the routine's readability.
-John On May 28, 9:07 am, Laurent PETIT <laurent.pe...@gmail.com> wrote: > (reduce > (fn [#^String s [#^CharSequence what #^CharSequence with]] > (.replace s what with)) > "Foo12 Bar130 Qoo20" > {"Foo" "XF" "Bar" "XB" "Qoo" "XQ"}) > > 2010/5/28 Oleg <oleg.richa...@gmail.com> > > > > > Hello Guys! > > > I have a string for example "Foo12 Bar130 Qoo20" and map like this > > {"Foo" "XF" "Bar" "XB" "Qoo" "XQ}. > > I want get: "XF12 XB130 XQ20" > > > I want to replace words in string based on map association. What is > > the elegant way to do it? Sure, i can use loop and recur > > to make string enter the next replacement, but is there another way to > > do it better? > > > Cheers, Oleg > > > -- > > 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