/** * Switches over to the stream produced by the provided function in case this * one fails with some typed error. * * @tsplus static effect/core/stream/Stream.Aspects catchSome * @tsplus pipeable effect/core/stream/Stream catchSome */ export function catchSome( pf: (e: E) => Maybe> ) { return (self: Stream): Stream => self.catchAll((e): Stream => pf(e).getOrElse(Stream.fail(e))) }