         - f: A closure `(T) -> Result<U, E>`.
      - Returns: A new `ResultPromise<U, E>` instance.
      */
-    func flatMap<U>(_ f: (@escaping (T) -> ResultPromise<U, E>)) -> ResultPromise<U, E> {
+    public func flatMap<U>(_ f: (@escaping (T) -> ResultPromise<U, E>)) -> ResultPromise<U, E> {
         let promise = ResultPromise<U, E>()
         await { result in
             switch result {

       `Result<U, E>` is the result of `flatMap`'ing `f` over the
       `Result<T, E>` embedded in this instance.
     */
    func map<U>(_ f: (@escaping (T) -> Result<U, E>)) -> ResultPromise<U, E> {
        let promise = ResultPromise<U, E>()
        await { result in
            promise.fulfil(with: result.flatMap(f))

    ///
    /// - Parameters:
    ///   - result: A `Result<T, E>` that describes the result.
    public func fulfil(with result: Result<T, E>) {
        self.result = result
    }
    
