jseely

utils

Nov 15th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. function sum(array)
  2. local total = 0
  3. for i = 1, #array, 1 do
  4. total = total + array[i]
  5. end
  6. return total
  7. end
  8.  
  9. function equal(a, b)
  10. if #a ~= #b then
  11. return false
  12. end
  13. for i = 1, #a, 1 do
  14. if a[i] ~= b[i] then
  15. return false
  16. end
  17. end
  18. return true
  19. end
Advertisement
Add Comment
Please, Sign In to add comment