// ets_tracing: off import type { Either } from "@effect-ts/system/Either" import * as E from "@effect-ts/system/Either" import type { Identity } from "../../Identity/index.js" /** * Fold `Identity` through `Either` */ export const foldMap_: ( M: Identity ) => (fa: E.Either, f: (a: A) => M) => M = (M) => (fa, f) => E.isLeft(fa) ? M.identity : f(fa.right) /** * Fold `Identity` through `Either` */ export const foldMap: ( M: Identity ) => (f: (a: A) => M) => (fa: Either) => M = (M) => (f) => (fa) => foldMap_(M)(fa, f)