// ets_tracing: off import { as_ } from "./as.js" import { chain_ } from "./core.js" import type { Effect } from "./effect.js" import { zipWithPar_ } from "./zipWithPar.js" /** * Sequentially zips this effect with the specified effect * returning the left side */ export function zipLeft_( a: Effect, b: Effect, __trace?: string ): Effect { return chain_(a, (r) => as_(b, r)) } /** * Sequentially zips this effect with the specified effect * returning the left side * * @ets_data_first zipLeft_ */ export function zipLeft(b: Effect, __trace?: string) { return (a: Effect) => zipLeft_(a, b, __trace) } /** * Parallelly zips this effect with the specified effect * returning the left side */ export function zipLeftPar_( a: Effect, b: Effect, __trace?: string ): Effect { return zipWithPar_(a, b, (a) => a, __trace) } /** * Parallelly zips this effect with the specified effect * returning the left side * * @ets_data_first zipLeftPar_ */ export function zipLeftPar(b: Effect, __trace?: string) { return (a: Effect) => zipLeftPar_(a, b, __trace) } /** * Sequentially zips this effect with the specified effect * returning the right side */ export function zipRight_( a: Effect, b: Effect, __trace?: string ): Effect { return chain_(a, () => b, __trace) } /** * Sequentially zips this effect with the specified effect * returning the right side * * @ets_data_first zipRight_ */ export function zipRight(b: Effect, __trace?: string) { return (a: Effect) => zipRight_(a, b, __trace) } /** * Parallelly zips this effect with the specified effect * returning the right side */ export function zipRightPar_( a: Effect, b: Effect, __trace?: string ): Effect { return zipWithPar_(a, b, (_, a) => a, __trace) } /** * Parallelly zips this effect with the specified effect * returning the right side * * @ets_data_first zipRightPar_ */ export function zipRightPar(b: Effect, __trace?: string) { return (a: Effect) => zipRightPar_(a, b, __trace) }