 		return f(r.value)
 	}
 }
+
+/// MARK: Equatable
+public func ==<L: Equatable, R: Equatable>(lhs: Either<L, R>, rhs: Either<L, R>) -> Bool {
+	switch (lhs, rhs) {
+	case let (.Left(l), .Left(r)) where l.value == r.value:
+		return true
+	case let (.Right(l), .Right(r)) where l.value == r.value:
+		return true
+	default:
+		return false
+	}
+}
+
+public func !=<L: Equatable, R: Equatable>(lhs: Either<L, R>, rhs: Either<L, R>) -> Bool {
+	return !(lhs == rhs)
+}

import class Foundation.NSError

/// The Either type represents values with two possibilities: a value of type Either<A, B> is either Left<A> or Right<B>.
///
/// The Either type is sometimes used to represent a value which is either correct or an error; by convention,
/// the Left constructor is used to hold an error value and the Right constructor is used to hold a correct
/// value (mnemonic: "right" also means "correct").
public enum Either<L, R> {
	case Left(Box<L>)
	case Right(Box<R>)

	}
}

/// Applicative `pure` function, lifts a value into an Right.
public func pure<L, R>(a: R) -> Either<L, R> {
	return .Right(Box(a))
}

/// Fmap | If the Either is Left, ignores the function and returns the Left. If the Either is Right,
/// applies the function to the Right value and returns the result in a new Right.
public func <^><L, RA, RB>(f: RA -> RB, a: Either<L, RA>) -> Either<L, RB> {
	switch a {
	case let .Left(l): 
