I think i jumped the shark with this one `inline i...
# sofl-user-group
j
I think i jumped the shark with this one
Copy code
inline infix fun <T, R> T.resultOf(f: (T).() -> R): Result<R, Throwable> = try {
    Result.Ok<R, Throwable>(f())
} catch (rt: RuntimeException) {
    throw rt
} catch (tr: Throwable) {
    Result.Error<R, Throwable>(tr)
}