diff --git a/index.html b/index.html
index 2e7a5c6..45166a3 100644
--- a/index.html
+++ b/index.html
@@ -2414,7 +2414,7 @@
2.2 Array.prototype.groupByMap ( callbackfn
2.3 AddValueToKeyedGroup ( groups, key, value )
The abstract operation AddValueToKeyedGroup takes arguments groups (a List of Records that have [[Key]] and [[Elements]] fields), key (an ECMAScript language value), and value (an ECMAScript language value). It performs the following steps when called:
- - If groups contains a Record g such that ! SameValue(g.[[Key]], key) is true, then
- Assert: exactly one element of groups meets this criteria.
- Append value as the last element of g.[[Elements]].
- Else,
- Let group be the Record { [[Key]]: key, [[Elements]]: « value » }.
- Append group as the last element of groups.
+ - For each Record { [[Key]], [[Elements]] } g of groups, do
- If ! SameValue(g.[[Key]], key) is true, then
- Assert: exactly one element of groups meets this criteria.
- Append value as the last element of g.[[Elements]].
- Return.
- Let group be the Record { [[Key]]: key, [[Elements]]: « value » }.
- Append group as the last element of groups.
diff --git a/spec.emu b/spec.emu
index b0268b1..55bce34 100644
--- a/spec.emu
+++ b/spec.emu
@@ -105,12 +105,13 @@ location: https://tc39.es/proposal-array-grouping/
- 1. If _groups_ contains a Record _g_ such that ! SameValue(_g_.[[Key]], _key_) is *true*, then
- 1. Assert: exactly one element of _groups_ meets this criteria.
- 1. Append _value_ as the last element of _g_.[[Elements]].
- 1. Else,
- 1. Let _group_ be the Record { [[Key]]: _key_, [[Elements]]: « _value_ » }.
- 1. Append _group_ as the last element of _groups_.
+ 1. For each Record { [[Key]], [[Elements]] } _g_ of _groups_, do
+ 1. If ! SameValue(_g_.[[Key]], _key_) is *true*, then
+ 1. Assert: exactly one element of _groups_ meets this criteria.
+ 1. Append _value_ as the last element of _g_.[[Elements]].
+ 1. Return.
+ 1. Let _group_ be the Record { [[Key]]: _key_, [[Elements]]: « _value_ » }.
+ 1. Append _group_ as the last element of _groups_.