diff options
| -rw-r--r-- | challenge-049/simon-proctor/raku/ch-1.p6 | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/challenge-049/simon-proctor/raku/ch-1.p6 b/challenge-049/simon-proctor/raku/ch-1.p6 index 82a55473f7..a53c9166fb 100644 --- a/challenge-049/simon-proctor/raku/ch-1.p6 +++ b/challenge-049/simon-proctor/raku/ch-1.p6 @@ -6,5 +6,13 @@ use v6.d; sub MAIN( UInt $x #= Number to look for multiple of ) { - ( $x, * + $x...* ).hyper.first( { $_ ~~ m!^ <[10]>+ $! } ).say; + my @seq = lazy gather { + my $current = 1; + loop { + take $current.base(2); + $current++; + } + } + + @seq.first( * %% $x ).say; } |
