Data update

This commit is contained in:
Ingy döt Net 2025-08-12 11:43:10 -07:00
parent 4924dd0264
commit cb74b7914d
10 changed files with 60 additions and 11 deletions

View file

@ -1,7 +1,10 @@
!YS-v0
defn main(n=10):
say: "$n! -> $factorial(n)"
defn main(*ns):
each n ns:
say: "$n! -> $factorial(n)"
defn factorial(x):
2 .. x: .mul(*)
if x <= 2:
(x ||| 1)
(2 .. x).mul(*)