From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more
123456789101112131415 #!/usr/bin/ruby### https://rosettacode.org/wiki/Left_factorials#Sidef#func left_fact(k) { sum(^k, { _! })}[range(0, 10), range(20, 50).by(10)].each { |r| r.each { |i| printf("!%d = %s\n", i, left_fact(i)); }}
#!/usr/bin/ruby
#
## https://rosettacode.org/wiki/Left_factorials#Sidef
func left_fact(k) {
sum(^k, { _! })
}
[range(0, 10), range(20, 50).by(10)].each { |r|
r.each { |i|
printf("!%d = %s\n", i, left_fact(i));