Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix remaining infix:<Z> tests
Need to explicitly flatten those ranges
  • Loading branch information
niner committed Aug 25, 2015
1 parent 5e181ff commit 21d17ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions S32-container/zip.t
Expand Up @@ -56,15 +56,15 @@ plan 14;
}

{
my @a = (1..3, 5) Z (6..8, 10);
my @a = flat (flat 1..3, 5) Z (flat 6..8, 10);
is @a.join(', '), "1, 6, 2, 7, 3, 8, 5, 10", 'infix:<Z> imposes list context';
}

# mix arrays and ranges
is ('a'..'c' Z 1, 2, 3).flat.join(','), 'a,1,b,2,c,3',
'can mix arrays and ranges for infix:<Z>';

is ("a".."c" Z "?", "a".."b").flat.join('|'), 'a|?|b|a|c|b',
is ("a".."c" Z flat "?", "a".."b").flat.join('|'), 'a|?|b|a|c|b',
'can mix arrays and ranges for infix:<Z>';

is zip(1,2; 3,4; 5,6):with(&infix:<~>), '135 246', 'zip:with works on list associative';
Expand Down

0 comments on commit 21d17ec

Please sign in to comment.