The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more
123456789 #!/usr/bin/rubyfunc c(n) is cached { n == 0 ? 1 : (c(n-1) * (4 * n - 2) / (n + 1))}15.times { |i| say "#{i}\t#{c(i)}";}
#!/usr/bin/ruby
func c(n) is cached {
n == 0 ? 1 : (c(n-1) * (4 * n - 2) / (n + 1))
}
15.times { |i|
say "#{i}\t#{c(i)}";