From c689acc93589e2a91e802c1aa5127043b581f4cc Mon Sep 17 00:00:00 2001 From: leaf corcoran Date: Wed, 9 Jan 2013 19:47:02 -0800 Subject: [PATCH] fix typo in fold (thanks Georg Schmid) --- moon/init.lua | 2 +- moon/init.moon | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/moon/init.lua b/moon/init.lua index af6337a..5cf4be8 100644 --- a/moon/init.lua +++ b/moon/init.lua @@ -154,7 +154,7 @@ fold = function(items, fn) if len > 1 then local accum = fn(items[1], items[2]) for i = 3, len do - accum = fn(acum, items[i]) + accum = fn(accum, items[i]) end return accum else diff --git a/moon/init.moon b/moon/init.moon index f3d822e..22cce0c 100644 --- a/moon/init.moon +++ b/moon/init.moon @@ -129,7 +129,7 @@ fold = (items, fn)-> if len > 1 accum = fn items[1], items[2] for i=3,len - accum = fn acum, items[i] + accum = fn accum, items[i] accum else items[1]