add Io mode

This commit is contained in:
nightwing 2013-11-18 10:43:42 +04:00
commit 09ddbeb341
5 changed files with 259 additions and 5 deletions

View file

@ -0,0 +1,6 @@
// computes factorial of a number
factorial := method(n,
if(n == 0, return 1)
res := 1
Range 1 to(n) foreach(i, res = res * i)
)