The rule should really always be: no warning at all (with
*warn-on-reflection* set to true, of course).

And in this case, I did what is necessary to avoid reflection warnings. Try
it yourself.

2010/5/28 John Cromartie <[email protected]>

> 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 <[email protected]> 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 <[email protected]>
> >
> >
> >
> > > 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 [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]<clojure%[email protected]>
> <clojure%[email protected]<clojure%[email protected]>>
> > > 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 [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]<clojure%[email protected]>
> 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 [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

Reply via email to