Pi: Difference between revisions

11 bytes removed ,  5 years ago
m
→‎{{header|Perl 6}}: simplified use of anonymous state variable
(added Ol)
m (→‎{{header|Perl 6}}: simplified use of anonymous state variable)
Line 3,355:
 
=={{header|Perl 6}}==
{{Works with|rakudo|2015-2018.10-23}}
<lang perl6># based on http://www.mathpropress.com/stan/bibliography/spigot.pdf
 
Line 3,362:
$z = safe($z, my $y = next($z)) ??
prod($z, take $y) !!
cons($z, @x[(state $)++])
}
}
2,392

edits