Iterate a Table

n = util.iter(func, t, [depth])

Iterate a table, calling the function func for each object.

Parameter Type Description
func function Function to call, n = foo(o)
t table Table or object to iterate
depth integer Maximum depth (Default = 3)
Returns Type Description
n integer Count or total.
Note

The function func can return a value that's summed to form the table n.