 
 // MARK: - Implementation details
 
-private func assertEqual<T>(actual: T?, equal: (T, T) -> Bool, expected: T?, message: String, file: String, line: UInt) -> T? {
+private func assertExpected<T>(actual: T?, match: (T, T) -> Bool, expected: T?, message: String, file: String, line: UInt) -> T? {
 	switch (actual, expected) {
 	case (.None, .None):
 		return actual
-	case let (.Some(x), .Some(y)) where equal(x, y):
+	case let (.Some(x), .Some(y)) where match(x, y):
 		return actual
 	default:
 		return failure("\(actual) is not equal to \(expected). " + message, file: file, line: line)

///
/// Returns the array, if equal and non-nil.
public func assertEqual<T: Equatable>(@autoclosure expression1: () -> [T]?, @autoclosure expression2: () -> [T]?, _ message: String = "", _ file: String = __FILE__, _ line: UInt = __LINE__) -> [T]? {
	return assertEqual(expression1(), ==, expression2(), message, file, line)
}



///
/// Returns the dictionary, if equal and non-nil.
public func assertEqual<T: Hashable, U: Equatable>(@autoclosure expression1: () -> [T: U]?, @autoclosure expression2: () -> [T: U]?, _ message: String = "", _ file: String = __FILE__, _ line: UInt = __LINE__) -> [T: U]? {
	return assertExpected(expression1(), ==, expression2(), message, file, line)
}


