On Oct 16, 5:13 pm, Timothy Pratley <[EMAIL PROTECTED]> wrote:
> Maybe something along these lines?
>
> (defn myreplace [str [a b]]
> (.replace str a b))
> (myreplace target search-replace)
> -> "heo world"
Same problem - it doesn't work within a doto block. This is where
JRuby-style reopening
On Thu, Oct 16, 2008 at 8:13 PM, Timothy Pratley
<[EMAIL PROTECTED]> wrote:
>
> Maybe something along these lines?
>
> (defn myreplace [str [a b]]
> (.replace str a b))
> (myreplace target search-replace)
> -> "heo world"
>
Clojure's ML/Haskell-style deconstructing of sequences takes a while
to si
Maybe something along these lines?
(defn myreplace [str [a b]]
(.replace str a b))
(myreplace target search-replace)
-> "heo world"
I can see how it would be nice to 'splice in' from a variable like the
[EMAIL PROTECTED] splicing from within a macro
--~--~-~--~~~---
On Oct 15, 8:07 pm, Michel Salim <[EMAIL PROTECTED]> wrote:
>
> Ah, so to clarify, you need some way to say
>
> (. "hello" (replace \l \m))
>
> but if \l and \m are given in a list, rather than as two separate
> things? Sounds like you might need to write a function to do that.
Yes, apply works i
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 bl
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 bl
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 worl