Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
luqui has now implemented 'pick' in Pugs:
my @rand = <a b c d e f g h>.pick(3);
is @rand.elems, 3, 'pick() should return the correct number of items';
ok all(@rand) ~~ any(@letters), '... and they should be in the letters';
But
my $compress = sub ($x) {
state $previous;
return $x ne $previous ?? ($previous = $x) !! ();
}
is map( $compress, 1.. 1000 ).pick(999).elems, 999,
'pick() should be unique';
Yup. Lots of fun with Pugs
Note how I tested the junctions, though. The following not only ran 8 tests, but it also spewed a bunch of garbage all over my screen!
use v6-alpha;
use Test;
plan 1;
is 'b', any('a'.. 'h'), 'junctions should work';
'pick' in Pugs 0 Comments More | Login | Reply /