Permalink
Browse files

basic implementation of &roundrobin; tests

  • Loading branch information...
1 parent 56e86dd commit abb8f3ab038a93ba5c42978875bdb01e26bb80a5 @moritz moritz committed May 14, 2012
Showing with 10 additions and 0 deletions.
  1. +9 −0 src/core/LoL.pm
  2. +1 −0 t/spectest.data
View
9 src/core/LoL.pm
@@ -73,3 +73,12 @@ sub infix:<Z>(**@lol) {
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;
+ }
+ }
+}
View
1 t/spectest.data
@@ -558,6 +558,7 @@ S32-array/shift.t
S32-array/splice.t
S32-array/unshift.t
S32-basics/warn.t
+S32-container/roundrobin.t
S32-container/zip.t
S32-exceptions/misc.t
S32-hash/delete.t

0 comments on commit abb8f3a

Please sign in to comment.