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