/** * @tsplus static Maybe.Ops separateF */ export const separateF = Wiltable.implementSeparateF()( (_: { A: A B: B G: G FR: FR FE: FE }) => (G: Applicative) => (f: (a: A) => HKT.Kind>) => (fa: Maybe): HKT.Kind, Maybe]> => { const maybe = fa.map((a) => G.map((e: Either) => [e.left, e.right] as const)(f(a))) return maybe.isNone() ? DSL.succeedF(G)([Maybe.none, Maybe.none]) : maybe.value } )