/** * Maps over the value type. * * @tsplus static effect/core/io/Exit.Aspects map * @tsplus pipeable effect/core/io/Exit map */ export function map(f: (a: A) => B) { return (self: Exit): Exit => { switch (self._tag) { case "Failure": return self case "Success": return Exit.succeed(f(self.value)) } } }