mikelovesrobots/lua-enumerable — pull request #2 by seclorum (2012-09-28 11:38:59+00:00)
Title: Adds a subtle new enumerator: table.all

From the README notes on difference between table.each() and table.all(), and why we need table.all() in lua-enumerator as well:
--
README

Synopsis:
local test = {1,2,3}

table.each(test, function (x) print(x) end)
-- 1
-- 2
-- 3

local holes = {1,2,7}
table.each(holes, function(x) print(x) end)
-- 1 2 7
table.all(holes, function(x) print(x) end)
-- 1 2 7
holes["1"] = "one"
holes["2"] = "two"
holes["7"] = "seven"
table.all(holes, function(x) print(x) end)
-- 1 2 7 one seven two
--BUT!
table.each(holes, function(x) print(x) end)
--1 2 7