On Thu, Dec 25, 2008 at 12:53:06AM -0500, Mark J. Reed wrote:
> I also tried this, but it caused Rakudo to throw a StopIteration and
> then segfault:
> for [...@gifts[0..$day-1]].pairs.reverse -> $n, $g

The StopIteration occurs when there aren't enough elements in the
list to supply to the parameters to the body.  In the example above,
it would occur whenever there are an odd number of pairs.

What's the correct behavior when this occurs?  Throw an exception,
extend the list with undefs for the extra parameters, or ...?


Reply via email to