|
|
Sətir 27: |
Sətir 27: |
|
| |
|
|
| |
|
| --[[--------------------------< F I R S T _ S E T >------------------------------------------------------------
| |
|
| |
|
| Locates and returns the first set value in a table of values where the order established in the table,
| |
| left-to-right (or top-to-bottom), is the order in which the values are evaluated. Returns nil if none are set.
| |
|
| |
| This version replaces the original 'for _, val in pairs do' and a similar version that used ipairs. With the pairs
| |
| version the order of evaluation could not be guaranteed. With the ipairs version, a nil value would terminate
| |
| the for-loop before it reached the actual end of the list.
| |
|
| |
| ]]
| |
|
| |
|
| local function first_set (list, count) | | local function first_set (list, count) |