// ets_tracing: off
import * as E from "../../../../Either";
import * as O from "../../../../Option";
import * as CollectWhile from "./collectWhile";
/**
 * Terminates the stream when encountering the first `Left`.
 */

export function collectWhileRight(self) {
  return CollectWhile.collectWhile_(self, E.fold(() => O.none, r => O.some(r)));
}
//# sourceMappingURL=collectWhileRight.js.map