foreach

LUA

foreach

foreach (TABLE, FUNC)

Executes FUNC over all elements of TABLE. FUNC is called repeatedly with the table’s index and value pairs. Loop exits if FUNC returns any non-nil value, and this value is returned as the flnal value. Behavior is undeflned if you change TABLE during traversal.