//
//  File.swift
//  
//
//  Created by CH on 12.10.22.
//

import Foundation

extension Optional {

    func unwrap(or error: @autoclosure () -> Error) throws -> Wrapped {
        guard let unwrapped = self else {
            throw error()
        }
        return unwrapped
    }
}
