From: Martin DeMello Date: 2005-04-15T17:29:41+09:00 Subject: Re: Weaving Arrays Mark Hubbart wrote: > > (1..10).weave('a'..'d') #==>[1, "a", 2, "b", 3, "c", 4, "d", 5, nil, > 6, nil, 7, nil, 8, nil, 9, nil, 10, nil] > ('a'..'d').weave(1..10) #==>["a", 1, "b", 2, "c", 3, "d", 4] > > > I glanced at the OP's code again, and I'm pretty sure that works the > same way, but in a faster and more generalized fashion. True, but the OP did ask for repeating the second array: Ideally, it'd be nice to be able to do something like line*format, with the product the weave of the two arrays. If the second array is shorter, repeat from the beginning. This would be an extension of the way array*string currently works. martin