On Oct 15, 9:08 pm, Martin DeMello <[EMAIL PROTECTED]> wrote:
> On Oct 15, 5:49 pm, Martin DeMello <[EMAIL PROTECTED]> wrote:
>
> > Is there any sort of "splat" operator that expands a list into an
> > inline sequence of arguments? Failing that, is there any way to use
> > apply within a doto block?
>
> > e..g
>
> > (def search-replace '("ll" "")
> > (def target "hello world")
>
> > (doto target
> >   ;(apply replace search-replace) <-- that, except something that
> > works
>
(replace {"ll" ""} "hello world")

(notice the use of a map rather than a list). This produces a
sequence, though; and wrapping it with (into "" ...) does not work
since a string does not appear to have full Clojure sequence
semantics.

I'm probably missing something regarding string handling, though. But
from what I've seen, it appears that the recommended way is to use
Java's built-in string methods here.

Regards,

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