given sequences xy and z 

(flatten (interleave (partition 1 2 xy)  (partition 1 2 (rest xy)) z))

works..

On Thursday, June 27, 2013 11:37:40 AM UTC+1, Paul Meehan wrote:
>
> Hi,
>
> Given a sequence (x1, y1, x2, y2, x3, y3,...)
>
> and another (z1, z2, z3, ...)
>
> I want to interleave such that I get a sequence
>
> (x1, y1, z1, x2, y2, z2, x3, y3, z3, ...)
>
> What's the most succinct way to achieve this?
>
> thanks
> Paul
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to