/** * Creates an effect from `Effect` that does not fail, but succeeds * with the `Take`. Any error returned from the stream when pulling is * converted to `Take.halt`. Creates a singleton chunk. * * @tsplus static effect/core/stream/Take.Ops fromEffect */ export function fromEffect(effect: Effect): Effect> { return effect.foldCause((cause) => Take.failCause(cause), Take.single) }