// tracing: off
import * as O from "../Option"
import { succeed } from "./core"
import { fail } from "./fail"
import { foldM_ } from "./foldM"
/**
 * Converts an option on values into an option on errors.
 */

export function some(self, __trace) {
  return foldM_(
    self,
    (e) => fail(O.some(e)),
    O.fold(() => fail(O.none), succeed),
    __trace
  )
}
//# sourceMappingURL=some.js.map
