Lightning flashed, thunder crashed and Perl6 RFC Librarian <[EMAIL PROTECTED]> whispered: | =head1 TITLE | | Builtins: zip() and unzip() | [snip] | | its arguments. C<unzip($list_size, \@list)> would reverse this operation. | [snip] | | If the list to be unzipped is not an exact multiple of the partition size, | the final list references are not padded--their length is one less than | the list size. For example: | | @list = (1..7); | @unzipped_list2 = unzip(3, \@list); # ([1,4,7], [2,5], [3,6]) This wording is confusing. Is $list_size or "the partition size" supposed to be the length of each list, or the number of lists? The way it is described leads me to think it should be the length of each list, but this example shows it being the number of lists. I would expect the @unzipped_list2 would return ([X,Y,Z], [A,B,C], [M]), although I can't wrap my mind around which values should go where yet. It makes more sense for it to be the number of lists, in which case @unzipped_list should be ([1,4], [2,5], [3,6]) not ([1,3,5], [2,4,6]). -spp
- Re: RFC 90 (v1) Builtins: zip() and unzip() John Porter
- Re: RFC 90 (v1) Builtins: zip() and unz... Dan Sugalski
- Re: RFC 90 (v1) Builtins: zip() and unzip() Damian Conway
- Re: RFC 90 (v1) Builtins: zip() and unz... Michael Fowler
- Re: RFC 90 (v1) Builtins: zip() and unzip() Tom Hughes
- Re: RFC 90 (v1) Builtins: zip() and unzip() Philip Newton
- Re: RFC 90 (v1) Builtins: zip() and unzip() Jeremy Howard
- Re: RFC 90 (v1) Builtins: zip() and unzip() John Porter
- Re: RFC 90 (v1) Builtins: zip() and unzip() raptor
- Re: RFC 90 (v1) Builtins: zip() and unzip() raptor
- Re: RFC 90 (v1) Builtins: zip() and unzip() Stephen P. Potter
- Re: RFC 90 (v1) Builtins: zip() and unzip() Jeremy Howard
- Re: RFC 90 (v1) Builtins: zip() and unzip() Stephen P. Potter
- RE: RFC 90 (v1) Builtins: zip() and unzip() Myers, Dirk
- Re: RFC 90 (v1) Builtins: zip() and unzip() Jarkko Hietaniemi
- Re: RFC 90 (v1) Builtins: zip() and unzip() Jeremy Howard
- Re: RFC 90 (v1) Builtins: zip() and unzip() Nathan Wiger
- Re: RFC 90 (v1) Builtins: zip() and unzip() Jeremy Howard
- Re: RFC 90 (v1) Builtins: zip() and unz... iain truskett
- Re: RFC 90 (v1) Builtins: zip() an... Jarkko Hietaniemi
- Re: RFC 90 (v1) Builtins: zip(... iain truskett