add factorial example

This commit is contained in:
darkf 2013-10-20 21:07:49 -07:00
parent 99ce2f75ee
commit 9dc145c08f
1 changed files with 4 additions and 0 deletions

4
examples/factorial.lamb Normal file
View File

@ -0,0 +1,4 @@
factorial(0) -> 1.
factorial(n) -> n * factorial(n - 1).
putstrln(itos(factorial(10))).