/** * Applies the function `f` if the argument is non-empty and returns the * results in a new `Maybe`. * * @tsplus static effect/core/io/Effect.Ops forEachMaybe */ export function forEachMaybe( maybe: Maybe, f: (a: A) => Effect ): Effect> { return maybe.fold(Effect.none, (a) => f(a).map(Maybe.some)) }