Last active
November 1, 2022 03:14
-
-
Save cjnevin/d3d376c7cfb89582dd1ade4d47ee582b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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