import * as tsplus_module_1 from "@tsplus/stdlib/data/Either/definition";
import * as tsplus_module_2 from "@tsplus/stdlib/data/Maybe/definition";
import * as tsplus_module_3 from "@effect/core/stream/Stream/operations/collectWhile";
/**
 * Terminates the stream when encountering the first `Right`.
 *
 * @tsplus fluent ets/Stream collectWhileLeft
 */

export function collectWhileLeft(self, __tsplusTrace) {
  return tsplus_module_3.collectWhile_(self, either => tsplus_module_1.isLeft(either) ? tsplus_module_2.some(either.left) : tsplus_module_2.none, __tsplusTrace);
}
//# sourceMappingURL=collectWhileLeft.mjs.map