import Base # Preserves the first cleanup failure and otherwise returns the final result. def combine( a, -E: Kind(a), first: Result, second: Result ) -> Result: match first: case Fail{error}: Fail{error} case Done{Unit{}}: second