// tracing: off
import * as O from "../../Option"
import { catchAll_ } from "./catchAll"
import { fail } from "./fail"
/**
 * Switches over to the stream produced by the provided function in case this one
 * fails with some typed error.
 */

export function catchSome_(self, f) {
  return catchAll_(self, (e) => O.getOrElse_(f(e), () => fail(e)))
}
/**
 * Switches over to the stream produced by the provided function in case this one
 * fails with some typed error.
 */

export function catchSome(f) {
  return (self) => catchSome_(self, f)
}
//# sourceMappingURL=catchSome.js.map
