         }
     }
 }
+
+extension Result: ResultProtocol {}


import Foundation


public enum Result<FulfilledValue> {
    case fulfilled(FulfilledValue)
    case rejected(Error)
}

        case .fulfilled(let r):
            do    { return try .fulfilled( body(r) ) }
            catch { return     .rejected( error   ) }
        }
    }
    public func getOrThrow() throws -> FulfilledValue {
        switch self {
        case .rejected(let e):
            throw e
        case .fulfilled(let r):
            return r
        }
    }
}
