Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
further GLR mods for 2012 advent days 13 & 14
  • Loading branch information
dwarring committed Aug 23, 2015
1 parent 1a710c0 commit d507a7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions integration/advent2012-day13.t
Expand Up @@ -56,7 +56,7 @@ ok red-blue-roll( $bag ), 'weighted roll';

# > say $bag.pick(*).join(" ");
my @pick = $bag.pick(*);
is-deeply @pick.sort, [|<blue blue blue blue blue blue blue blue blue blue red red>], '.pick(*)';
is-deeply [@pick.sort], [<blue blue blue blue blue blue blue blue blue blue red red>], '.pick(*)';

$bag = {"red" => 20000000000000000001, "blue" => 100000000000000000000}.Bag;

Expand All @@ -72,7 +72,7 @@ do {
my $words2 = set $slurp2.comb(/\w+/).map(*.lc);
my $unique = ($words1 (-) $words2);
isa-ok $unique, Bag, 'set difference (-)';
is-deeply $unique.keys.sort, [|<aa bb cc zz>], 'set difference (-)';
is-deeply [$unique.keys.sort], [<aa bb cc zz>], 'set difference (-)';
}

my $s1 = set <A B>;
Expand Down
2 changes: 1 addition & 1 deletion integration/advent2012-day14.t
Expand Up @@ -56,7 +56,7 @@ is-deeply [(2 .. 20).grep({is-prime-alpha($_)})], @primes_lt_20, 'prime (alpha)'
is-deeply [(2 .. 20).grep({is-prime-beta($_)})], @primes_lt_20, 'prime (beta)';
is-deeply [(2 .. 20).grep({is-prime-rm($_, $_)})], @primes_lt_20, 'prime (rabin-miller)';

my @primes_lt_200 = (@primes_lt_20.Slip, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199);
my @primes_lt_200 = @primes_lt_20.Slip, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199;

{
my @primes-beta = (2 .. 200).grep({is-prime-beta($_)});
Expand Down

0 comments on commit d507a7d

Please sign in to comment.