// ets_tracing: off
import * as CK from "../../../Collections/Immutable/Chunk";
import * as T from "../../../Effect";
import * as CH from "../Channel";
import * as C from "./core";
export function dropWhileEffect(p) {
  const loop = CH.readWith(in_ => CH.unwrap(T.map_(CK.dropWhileM_(in_, p), leftover => {
    const more = CK.isEmpty(leftover);
    return more ? loop : CH.zipRight_(CH.write(leftover), CH.identity());
  })), _ => CH.fail(_), _ => CH.unit);
  return new C.Sink(loop);
}
//# sourceMappingURL=dropWhileEffect.js.map