Join Slack
Powered by
Thanks for the response, <@U0B8UEMV1>. Is there a ...
# arrow
a
Attila Domokos
11/03/2019, 3:42 AM
Thanks for the response,
@pakoito
. Is there a blog post, tutorial, doc I could see how
Either.catch
looks like in this context? I understand
Try { }
is essentially the same, but it still reads better than
try/catch
.
p
pakoito
11/03/2019, 10:32 AM
suspend fun catch(f: suspend () -> A) = try { f().right() } catch (t: Throwable) { t.left() }
pakoito
11/03/2019, 10:33 AM
Either.catch { myFun() }
2
Views
Open in Slack
Previous
Next