Data update
This commit is contained in:
parent
4924dd0264
commit
cb74b7914d
10 changed files with 60 additions and 11 deletions
|
|
@ -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(*)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue