import * as T from "../../../Effect";
import * as CH from "../Channel";
import * as SK from "../Sink";
/**
 * A sink that executes the provided effectful function for every element fed to it.
 */

export function forEach(f) {
  const process = CH.readWithCause(in_ => CH.zipRight_(CH.fromEffect(T.forEachUnit_(in_, f)), process), halt => CH.failCause(halt), _ => CH.end(undefined));
  return new SK.Sink(process);
}
//# sourceMappingURL=forEach.js.map