 	}
     
     public static func ==(lhs: RedBlackTree, rhs: RedBlackTree) -> Bool {
-        guard lhs.count == rhs.count else {
-            return false
+        return lhs.count == rhs.count && lhs.elementsEqual(rhs) {
+            $0.0.key == $0.1.key
         }
-        
-        for i in 0..<lhs.count {
-            if lhs[i].key != rhs[i].key {
-                return false
-            }
-        }
-        return true
     }
 
     public static func +(lhs: RedBlackTree, rhs: RedBlackTree) -> RedBlackTree<Key, Value> {

* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

public struct RedBlackTree<Key: Comparable, Value>: Probable, Collection, CustomStringConvertible {
    /// Returns the position immediately after the given index.
    ///
    /// - Parameter i: A valid index of the collection. `i` must be less than
    ///   `endIndex`.
    /// - Returns: The index value immediately after `i`.
    public func index(after i: Int) -> Int {
        return i < endIndex ? i + 1 : 0
    }

	public typealias Iterator = AnyIterator<(key: Key, value: Value?)>

	*/
	public var description: String {
        return "[" + map { "\($0)" }.joined(separator: ", ") + "]"
	}

	/**
