From 3c6aaf1a765bf4bb0f5caf01613974653b36c88d Mon Sep 17 00:00:00 2001 From: Sheepolution Date: Tue, 1 Mar 2022 02:03:33 +0100 Subject: [PATCH] Return table in foreach for chaining --- functional.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/functional.lua b/functional.lua index 127b430..8165652 100644 --- a/functional.lua +++ b/functional.lua @@ -38,6 +38,7 @@ function functional.foreach(t, f) return result end end + return t end --performs a left to right reduction of t using f, with seed as the initial value