diff --git a/index.html b/index.html
index 2e009b8..e84cedf 100644
--- a/index.html
+++ b/index.html
@@ -9,7 +9,7 @@
Stage 2 Draft / November 25, 2023
Set methods
+ Stage 2 Draft / December 3, 2023
Set methods
1 Set.prototype.union ( other )
@@ -26,7 +26,7 @@ 2 Set.prototype.intersection ( other
3 Set.prototype.difference ( other )
This method performs the following steps when called:
- - Let O be the this value.
- Perform ? RequireInternalSlot(O, [[SetData]]).
- Let otherRec be ? GetSetRecord(other).
- Let resultSetData be a copy of O.[[SetData]].
- Let thisSize be the number of elements in O.[[SetData]].
- If thisSize ≤ otherRec.[[Size]], then
- Let index be 0.
- Repeat, while index < thisSize,
- Let e be resultSetData[index].
- Set index to index + 1.
- If e is not empty, then
- Let inOther be ToBoolean(? Call(otherRec.[[Has]], otherRec.[[Set]], « e »)).
- If inOther is true, then
- Set resultSetData[index] to empty.
- Else,
- Let keysIter be ? GetIteratorFromMethod(otherRec.[[Set]], otherRec.[[Keys]]).
- Let next be true.
- Repeat, while next is not false,
- Set next to ? IteratorStep(keysIter).
- If next is not false, then
- Let nextValue be ? IteratorValue(next).
- If nextValue is -0𝔽, set nextValue to +0𝔽.
- If SetDataHas(resultSetData, nextValue) is true, then
- Remove nextValue from resultSetData.
- Let result be OrdinaryObjectCreate(%Set.prototype%, « [[SetData]] »).
- Set result.[[SetData]] to resultSetData.
- Return result.
+ - Let O be the this value.
- Perform ? RequireInternalSlot(O, [[SetData]]).
- Let otherRec be ? GetSetRecord(other).
- Let resultSetData be a copy of O.[[SetData]].
- Let thisSize be the number of elements in O.[[SetData]].
- If thisSize ≤ otherRec.[[Size]], then
- Let index be 0.
- Repeat, while index < thisSize,
- Let e be resultSetData[index].
- If e is not empty, then
- Let inOther be ToBoolean(? Call(otherRec.[[Has]], otherRec.[[Set]], « e »)).
- If inOther is true, then
- Set resultSetData[index] to empty.
- Set index to index + 1.
- Else,
- Let keysIter be ? GetIteratorFromMethod(otherRec.[[Set]], otherRec.[[Keys]]).
- Let next be true.
- Repeat, while next is not false,
- Set next to ? IteratorStep(keysIter).
- If next is not false, then
- Let nextValue be ? IteratorValue(next).
- If nextValue is -0𝔽, set nextValue to +0𝔽.
- If SetDataHas(resultSetData, nextValue) is true, then
- Remove nextValue from resultSetData.
- Let result be OrdinaryObjectCreate(%Set.prototype%, « [[SetData]] »).
- Set result.[[SetData]] to resultSetData.
- Return result.