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