Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/es6/Stdlib_Dict.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function forEach(dict, f) {
}

function forEachWithKey(dict, f) {
Object.entries(dict).forEach(param => f(param[1], param[0]));
Object.keys(dict).forEach(key => f(dict[key], key));
}

function mapValues(dict, f) {
Expand Down
2 changes: 1 addition & 1 deletion lib/js/Stdlib_Dict.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function forEach(dict, f) {
}

function forEachWithKey(dict, f) {
Object.entries(dict).forEach(param => f(param[1], param[0]));
Object.keys(dict).forEach(key => f(dict[key], key));
}

function mapValues(dict, f) {
Expand Down
2 changes: 1 addition & 1 deletion runtime/Stdlib_Dict.res
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let forEach = (dict, f) => {
}

let forEachWithKey = (dict, f) => {
dict->toArray->Stdlib_Array.forEach(((key, value)) => f(value, key))
dict->keysToArray->Stdlib_Array.forEach(key => f(dict->getUnsafe(key), key))
}

let mapValues = (dict, f) => {
Expand Down
Loading