RosettaCodeData/Task/Van-der-Corput-sequence/Perl-6/van-der-corput-sequence-2.pl6

8 lines
123 B
Raku
Raw Permalink Normal View History

2015-11-18 06:14:39 +00:00
sub VdC($base = 2) {
map {
[+] $_ && .polymod($base xx *) Z/ [\*] $base xx *
}, ^Inf
2013-04-11 01:07:29 -07:00
}
2015-11-18 06:14:39 +00:00
.say for VdC[^10];