Skip to content

Instantly share code, notes, and snippets.

@cjnevin
Last active November 1, 2022 03:14
Show Gist options
  • Save cjnevin/d3d376c7cfb89582dd1ade4d47ee582b to your computer and use it in GitHub Desktop.
Save cjnevin/d3d376c7cfb89582dd1ade4d47ee582b to your computer and use it in GitHub Desktop.
struct Assert<T> {
let value: T
}
func assert<T>(_ value: @autoclosure () throws -> T) rethrows -> Assert<T> {
try .init(value: value())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment