import * as tsplus_module_1 from "@tsplus/stdlib/data/Either/merge";
import * as tsplus_module_2 from "@effect/core/io/Schedule/operations/andThenEither";
import * as tsplus_module_3 from "@effect/core/io/Schedule/operations/map";
/**
 * The same as `andThenEither`, but merges the output.
 *
 * @tsplus operator ets/Schedule /
 * @tsplus operator ets/Schedule/WithState /
 * @tsplus fluent ets/Schedule andThen
 * @tsplus fluent ets/Schedule/WithState andThen
 */

export function andThen_(self, that) {
  return tsplus_module_3.map_(tsplus_module_2.andThenEither_(self, that), either => tsplus_module_1.merge(either));
}
/**
 * The same as `andThenEither`, but merges the output.
 *
 * @tsplus static ets/Schedule/Aspects andThen
 */

export const andThen = that => self => andThen_(self, that);
//# sourceMappingURL=andThen.mjs.map