I have a situation where I have create a container which wraps a closure. This closure can be Result enum which has success and failure case.
Create a new container type EventResult<U, E: Error> that wraps a function like ((Result<U,E>) -> Void) -> Void and notifies you in case of success or failure.