diff --git a/docs/index.html b/docs/index.html index b90290c..257b5cd 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,6 +1,6 @@ -New Set methods

New Set methods

+New Set methods

New Set methods

@@ -36,22 +36,22 @@

3Set.prototype.intersect(iterable) -

4Set.prototype.difference(iterable)

-

When the difference method is called, the following steps are taken:

+

4Set.prototype.except(iterable)

+

When the except method is called, the following steps are taken:

  1. Let set be the this value.
  2. If Type(set) is not Object, throw a TypeError exception.
  3. Let Ctr be ? SpeciesConstructor(set, %Set%)
  4. Let newSet be ? Construct(Ctr, set)
  5. Let remover be ? Get(newSet, "delete").
  6. If IsCallable(remover) is false, throw a TypeError exception.
  7. Let iter be GetIterator(iterable).
  8. If iter is undefined, throw a TypeError exception.
  9. Repeat,
    1. Let next be IteratorStep(iter).
    2. If next is false, return newSet.
    3. Let nextValue be ? IteratorValue(next).
    4. Let status be Call(remover, newSet, « nextValue.[[Value]] »)
    5. If status is an abrupt completion, return ? IteratorClose(iter, status)
-

The length property of the union method is 1.

+

The length property of the except method is 1.

- -

5Set.prototype.symmetricDifference(iterable)

-

When the symmetricDifference method is called, the following steps are taken:

+ +

5Set.prototype.xor(iterable)

+

When the xor method is called, the following steps are taken:

  1. Let set be the this value.
  2. If Type(set) is not Object, throw a TypeError exception.
  3. Let Ctr be ? SpeciesConstructor(set, %Set%)
  4. Let newSet be ? Construct(Ctr, set)
  5. Let remover be ? Get(newSet, "delete").
  6. If IsCallable(remover) is false, throw a TypeError exception.
  7. Let adder be ? Get(newSet, "add").
  8. If IsCallable(adder) is false, throw a TypeError exception.
  9. Let iter be GetIterator(iterable).
  10. If iter is undefined, throw a TypeError exception.
  11. Repeat,
    1. Let next be IteratorStep(iter).
    2. If next is false, return newSet.
    3. Let nextValue be ? IteratorValue(next).
    4. Let removed be Call(remover, newSet, « nextValue.[[Value]] »).
    5. If removed is an abrupt completion, return ? IteratorClose(iter, removed).
    6. If removed is false,
      1. Let status be Call(adder, newSet, « nextValue.[[Value]] »).
      2. If status is an abrupt completion, return ? IteratorClose(iter, status).
-

The length property of the symmetricDifference method is 1.

+

The length property of the xor method is 1.

ACopyright & Software License

diff --git a/spec/index.html b/spec/index.html index 2207428..4451d94 100644 --- a/spec/index.html +++ b/spec/index.html @@ -31,11 +31,11 @@

Set.prototype.intersect(_iterable_)

-

Set.prototype.difference(_iterable_)

+

Set.prototype.except(_iterable_)

- -

Set.prototype.symmetricDifference(_iterable_)

+ +

Set.prototype.xor(_iterable_)

diff --git a/spec/set-prototype-difference.html b/spec/set-prototype-difference.html index 09d8725..9d3715a 100644 --- a/spec/set-prototype-difference.html +++ b/spec/set-prototype-difference.html @@ -1,4 +1,4 @@ -

When the `difference` method is called, the following steps are taken:

+

When the `except` method is called, the following steps are taken:

1. Let _set_ be the *this* value. @@ -19,4 +19,4 @@ -

The `length` property of the `union` method is *1*.

+

The `length` property of the `except` method is *1*.

diff --git a/spec/set-prototype-symmetric-difference.html b/spec/set-prototype-symmetric-difference.html index 827af88..301fc53 100644 --- a/spec/set-prototype-symmetric-difference.html +++ b/spec/set-prototype-symmetric-difference.html @@ -1,4 +1,4 @@ -

When the `symmetricDifference` method is called, the following steps are taken:

+

When the `xor` method is called, the following steps are taken:

1. Let _set_ be the *this* value. @@ -22,4 +22,4 @@ 1. If _status_ is an abrupt completion, return ? IteratorClose(_iter_, _status_). -

The `length` property of the `symmetricDifference` method is *1*.

+

The `length` property of the `xor` method is *1*.