filter(f: (a: A) => boolean): Optional<Either<A, B>> {
        if (this.self.isLeft) {
            return f(<A>this.self.value) ? Optional.apply(this.self) : None;
        } else {
            return None;