Skip to content

Commit ee20940

Browse files
committed
Fixed bug in Enum.map_reduce
1 parent 871f6f8 commit ee20940

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

mix.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%{"earmark": {:hex, :earmark, "0.1.17"},
2-
"estree": {:hex, :estree, "2.0.0"},
2+
"estree": {:git, "git://github.com/bryanjos/elixir-estree.git", "76617aef1e14d211c2371537363a099bcac681d8", []},
33
"ex_doc": {:hex, :ex_doc, "0.7.3"},
44
"inflex": {:hex, :inflex, "1.3.0"},
55
"shouldi": {:hex, :shouldi, "0.2.3"}}

priv/javascript/lib/enum.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ let Enum = {
8585
for (var i = 0; i < collection.length; i++) {
8686
let tuple = fun(collection[i], the_acc);
8787

88-
the_acc = tuple.get(1);
89-
mapped = Erlang.list(...mapped.concat([tuple.get(0)]))
88+
the_acc = Kernel.elem(tuple, 1);
89+
mapped = Erlang.list(...mapped.concat([Kernel.elem(tuple, 0)]));
9090
}
9191

9292
return Erlang.tuple(mapped, the_acc);

0 commit comments

Comments
 (0)