/** * Summarizes a effect by computing some value before and after execution, and * then combining the values to produce a summary, together with the result of * execution. * * @tsplus static effect/core/io/Effect.Aspects summarized * @tsplus pipeable effect/core/io/Effect summarized */ export function summarized( summary: Effect, f: (start: B, end: B) => C ) { return (self: Effect): Effect => Do(($) => { const start = $(summary) const value = $(self) const end = $(summary) return [f(start, end), value] as const }) }