diff options
| author | rir <rirans@comcast.net> | 2024-02-04 20:46:42 -0500 |
|---|---|---|
| committer | rir <rirans@comcast.net> | 2024-02-04 21:05:20 -0500 |
| commit | f4de42db83c16b8cc87f47d9bfa9eb1266c4e827 (patch) | |
| tree | 59658a2109d29649be5e4bc0e55e6b141ecf1b46 | |
| parent | cdc7447f01765914a09e5e4cbd8dceddad1df70d (diff) | |
| download | perlweeklychallenge-club-f4de42db83c16b8cc87f47d9bfa9eb1266c4e827.tar.gz perlweeklychallenge-club-f4de42db83c16b8cc87f47d9bfa9eb1266c4e827.tar.bz2 perlweeklychallenge-club-f4de42db83c16b8cc87f47d9bfa9eb1266c4e827.zip | |
254 fallthru
| -rw-r--r-- | challenge-254/0rir/raku/ch-1.raku | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/challenge-254/0rir/raku/ch-1.raku b/challenge-254/0rir/raku/ch-1.raku index 7081fb7e89..fba96c8382 100644 --- a/challenge-254/0rir/raku/ch-1.raku +++ b/challenge-254/0rir/raku/ch-1.raku @@ -16,7 +16,7 @@ Output: true constant \Part-power = 40; # partitioning power constant \Part = 3**Part-power; # " value -constant \Test-to-power = 100; # rough range for tests +constant \Test-to-power = 1000; # rough range for tests constant @test-powers = 3, * × 3 … 3**Test-to-power; # passing test values constant @standard = gather { # create standard for look up in the partition @@ -30,17 +30,12 @@ constant @standard = gather { # create standard for look up in the partition sub power3 ( Int $i is copy -->Bool) { if $i ≤ @standard[*-1] { - if $i == @standard.any { return True if $i == @standard.any; - } else { return False; - } - } else { + } my $shrunk = $i div @standard[*-1]; # shrink by a partition return False if $i ÷ @standard[*-1] ≠ $shrunk; # not integer - return power3 $shrunk; - } - die "reached but did not grasp"; + power3 $shrunk; } my @Test = |
