// ets_tracing: off
import * as CS from "../../../../Cause";
import * as E from "../../../../Either";
import * as C from "../core";
export function foldChannel_(self, onErr, onSucc) {
  return C.foldCauseChannel_(self, _ => {
    return E.fold_(CS.failureOrCause(_), err => onErr(err), cause => C.failCause(cause));
  }, onSucc);
}
/**
 * @ets_data_first foldChannel_
 */

export function foldChannel(onErr, onSucc) {
  return self => foldChannel_(self, onErr, onSucc);
}
//# sourceMappingURL=foldChannel.js.map