"Sterin, Ilya" <[EMAIL PROTECTED]> wrote:
> Just one question, how
> would merge behave on two different sized arrays.
>
> @a = (1..5);
> @b = (1..10);
> merge(@a, @b);
>
> ##Would return (1,1,2,2,3,3,4,4,5,5,??????????
>
> Would it stop on the shortest array. Couldn't quite find such explanation
> in the RFC.
>
I don't think I specified this in the RFC, since I remember having some
debates with Damian and others about it that weren't resolved. Now that
I've had a chance to think about this some more, I think the correct
behaviour is for the shorter list to reset to the start and continue. It
is this behaviour that is the source of J and APL's broadcasting
flexibility. For details see:
http://www.jsoftware.com/primer/agreement.htm
--
Jeremy Howard
[EMAIL PROTECTED]