No problem :)  I prefer built-in's as well, but I couldn't find
anything.  Maybe someone else will have better luck...

On Dec 18, 3:32 pm, Glen Rubin <rubing...@gmail.com> wrote:
> ok that's looks very succinct, I will use it.  Just figured I would
> ask if it exists, b/c always prefer to use a built-in and it sounded
> basic enough to be.  thanks!
>
> On Dec 18, 5:15 pm, Benny Tsai <benny.t...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I didn't see a built-in fn for this, and couldn't restrain myself from
> > trying to write one:
>
> > (defn replace-first-n [xs ys]
> >   (let [n (count ys)]
> >     (concat ys (drop n xs))))
>
> > On Dec 18, 2:38 pm, Glen Rubin <rubing...@gmail.com> wrote:
>
> > > I am looking for a fn that does the following.  Let's say i have
> > > sequences A & B
>
> > > A:  '(1 2 3 4 5 6 7 8 9 10)
>
> > > B '(54 666 23)
>
> > > I want to replace A's first items with B's, so that I get:
>
> > > '(54 666 23 4 5 6 7 8 9 10)
>
> > > Is there a fn to do this?  Otherwise, I will write one.  Thanks!

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