Skip to content

Commit

Permalink
basic implementation of &roundrobin; tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed May 14, 2012
1 parent 56e86dd commit abb8f3a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/core/LoL.pm
Expand Up @@ -73,3 +73,12 @@ sub infix:<Z>(**@lol) {


my &zip := &infix:<Z>; my &zip := &infix:<Z>;


sub roundrobin(**@lol) {
my @l = @lol.map({ (.flat,).list.item });
gather {
my $p;
while $p := @l.grep(*.Bool).map(*.shift).eager.Parcel {
take $p;
}
}
}
1 change: 1 addition & 0 deletions t/spectest.data
Expand Up @@ -558,6 +558,7 @@ S32-array/shift.t
S32-array/splice.t S32-array/splice.t
S32-array/unshift.t S32-array/unshift.t
S32-basics/warn.t S32-basics/warn.t
S32-container/roundrobin.t
S32-container/zip.t S32-container/zip.t
S32-exceptions/misc.t S32-exceptions/misc.t
S32-hash/delete.t S32-hash/delete.t
Expand Down

0 comments on commit abb8f3a

Please sign in to comment.