Advertisement
cwchen

[Perl 6] Creating a Bag.

Nov 8th, 2017
640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.13 KB | None | 0 0
  1. my $bag = (1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 5, 5).Bag;
  2.  
  3. $bag.elems == 5 or die "Wrong element count";
  4. $bag (cont) 1 or die "Wrong status";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement