On Thu, Dec 25, 2008 at 12:00 PM, Patrick R. Michaud <pmich...@pobox.com> wrote: > 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.
OK, so that loops through the list in groups of two. So how do I Ioop through a list of Pairs assigning the key to one var and the value to another? It's not a Hash, and calling .kv on it yields 0=>first pair, 1=>second pair, etc... I don't want to Hashify it because I want to preserve the order... -- Mark J. Reed <markjr...@gmail.com>