Using Result type lazily (Result) in Swift
LazyResult looks like this:
func getInt() throws -> Int {
...
}
var lazyResult = LazyResult(catching: getInt)
lazyResult.preform()
try lazyResult.get()
File > Swift Packages > Add Package Dependency
dependencies: [
.package(url: "https://github.com/ytyubox/LazyResult", from: "1.0.0"),
],