diff options
| -rw-r--r-- | challenge-004/fjwhittle/blog.txt | 1 | ||||
| -rw-r--r-- | challenge-004/fjwhittle/perl6/ch-1--first.p6 | 1 | ||||
| -rw-r--r-- | challenge-004/fjwhittle/perl6/ch-1.p6 | 8 |
3 files changed, 10 insertions, 0 deletions
diff --git a/challenge-004/fjwhittle/blog.txt b/challenge-004/fjwhittle/blog.txt new file mode 100644 index 0000000000..55e8085e45 --- /dev/null +++ b/challenge-004/fjwhittle/blog.txt @@ -0,0 +1 @@ +https://rage.powered.ninja/2019/04/15/no-pi-file.html diff --git a/challenge-004/fjwhittle/perl6/ch-1--first.p6 b/challenge-004/fjwhittle/perl6/ch-1--first.p6 new file mode 100644 index 0000000000..7d60b2b87e --- /dev/null +++ b/challenge-004/fjwhittle/perl6/ch-1--first.p6 @@ -0,0 +1 @@ +printf "%.16f",pi
\ No newline at end of file diff --git a/challenge-004/fjwhittle/perl6/ch-1.p6 b/challenge-004/fjwhittle/perl6/ch-1.p6 new file mode 100644 index 0000000000..3ae01ddb41 --- /dev/null +++ b/challenge-004/fjwhittle/perl6/ch-1.p6 @@ -0,0 +1,8 @@ +my $eu-seq = gather { + take 1; + for 1..* -> $n { take $eu-seq[$n - 1] * FatRat.new($n, 2 * $n + 1) } +} + +my \π := 2 * [+] $eu-seq[^608]; + +put π.Str.substr: ^($?FILE.IO.s+1); |
