mirror of
https://github.com/leafo/moonscript.git
synced 2025-01-09 00:04:22 +00:00
fix typo in fold (thanks Georg Schmid)
This commit is contained in:
parent
71d9742faf
commit
c689acc935
@ -154,7 +154,7 @@ fold = function(items, fn)
|
|||||||
if len > 1 then
|
if len > 1 then
|
||||||
local accum = fn(items[1], items[2])
|
local accum = fn(items[1], items[2])
|
||||||
for i = 3, len do
|
for i = 3, len do
|
||||||
accum = fn(acum, items[i])
|
accum = fn(accum, items[i])
|
||||||
end
|
end
|
||||||
return accum
|
return accum
|
||||||
else
|
else
|
||||||
|
@ -129,7 +129,7 @@ fold = (items, fn)->
|
|||||||
if len > 1
|
if len > 1
|
||||||
accum = fn items[1], items[2]
|
accum = fn items[1], items[2]
|
||||||
for i=3,len
|
for i=3,len
|
||||||
accum = fn acum, items[i]
|
accum = fn accum, items[i]
|
||||||
accum
|
accum
|
||||||
else
|
else
|
||||||
items[1]
|
items[1]
|
||||||
|
Loading…
Reference in New Issue
Block a user