Permalink
Browse files

Update README.md

  • Loading branch information...
1 parent b5478e7 commit ebe20c738aca43642e1989b679bc251e9b0f0b69 @Havvy committed Feb 3, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 README.md
View
@@ -92,9 +92,9 @@ The `Set` class has the following methods:
* `pick()`: Return a random element of the set, or null if the set is empty. Unlike `pop`, does not remove the element from the set.
-* `each(callback)`: Call a callback function on each element of the set. If the set is changed by the callback, the results are undefined. The callback takes a single argument: the set element that it's being called on.
+* `each(callback)`: Call a callback function on each element of the set. If the set is changed by the callback, the results are undefined. The callback takes a single argument: the set element that it's being called on. Callback takes the same parameters as the forEach method of arrays: value, index, set. Takes an optional parameter that sets what this is bound to.
-The condition for determining whether two values are equal is the `===` operator. Therefore sets can support any mix of data types, as long as the data types can be compared for equality in some meaningful sense with `===`. Callback takes the same parameters as the forEach method of arrays: value, index, set. Takes an optional parameter that sets what this is bound to.
+The condition for determining whether two values are equal is the `===` operator. Therefore sets can support any mix of data types, as long as the data types can be compared for equality in some meaningful sense with `===`.
Specialized sets
----------

0 comments on commit ebe20c7

Please sign in to comment.