import type { EvalInternal } from "@tsplus/stdlib/io/Eval" import { FlatMap } from "@tsplus/stdlib/io/Eval/definition" /** * Extends this computation with another computation that depends on the * result of this computation by running the first computation, using its * result to generate a second computation, and running that computation. * * @tsplus static Eval.Aspects flatMap * @tsplus pipeable Eval flatMap */ export function flatMap(f: (a: A) => Eval) { return (self: Eval): Eval => new FlatMap(self as EvalInternal, f as (a: A) => EvalInternal) }