From f36946ace455228d8b4fdd6ef3f7e0ff6b7f07cf Mon Sep 17 00:00:00 2001 From: Sheepolution Date: Tue, 1 Mar 2022 03:01:39 +0100 Subject: [PATCH] Add comment to foreach regarding new behaviour --- functional.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/functional.lua b/functional.lua index 8165652..d6748d2 100644 --- a/functional.lua +++ b/functional.lua @@ -31,6 +31,7 @@ end --simple sequential iteration, f is called for all elements of t --f can return non-nil to break the loop (and return the value) +--otherwise returns t for chaining function functional.foreach(t, f) for i = 1, #t do local result = f(t[i], i)