Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. -- defines a factorial function
  2. function fact (n)
  3. if (n == 0) then
  4. return 1
  5. else
  6. return n*fact(n - 1)
  7. end
  8. end
  9.  
  10. return fact(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement