On Thu, Nov 19, 2009 at 7:15 PM, Alex Osborne <a...@meshy.org> wrote:

> John Harrop wrote:
> > On Thu, Nov 19, 2009 at 7:00 PM, Sean Devlin <francoisdev...@gmail.com
> > <mailto:francoisdev...@gmail.com>> wrote:
> >
> >     That's why there are two separate functions do do what you suggest
> >
> >     user=>(interleave [1 2 3 4] [1 2 3 4])
> >     (1 1 2 2 3 3 4 4)
> >
> >     user=> (concat [1 2 3 4] [1 2 3 4])
> >     (1 2 3 4 1 2 3 4)
> >
> >
> > Poor choice of example. I think he meant even if he has e.g.
> >
> > (keep-likes-with-likes-interleave [1 2 3 4 5 6 7] [3 2 7])
> >
> > he wants
> >
> > [1 2 2 3 3 4 5 6 7 7]
> >
> > rather than
> >
> > (1 3 2 2 3 7)
>
> This is just (sort (concat [1 2 3 4 5 6 7] [3 2 7])) though.


I think he also wants the original order of the first input coll to be
preserved, though. Sort wouldn't do that.

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