dmcg
08/21/2017, 1:28 PMelizarov
08/21/2017, 3:50 PMnatpryce
08/21/2017, 5:04 PMelizarov
08/21/2017, 5:49 PMEither
type for that. It is easy to roll your own with a sealed class.Result
is specifically reserved to represent “_result_ of execution of a Kotlin function” which is, by definition of Kotlin language, is either a declared result of the corresponding function or a Throwable
. E.g., in Kotlin a result of function declared with fun X(): T
is actually Either<Throwable,T>
, and code blocks in Kotlin correspond to do-notation on the corresponding monad.natpryce
08/22/2017, 6:18 AMdmcg
08/22/2017, 7:15 AMelizarov
08/22/2017, 6:28 PMResult
is described in the corresponding issue https://youtrack.jetbrains.com/issue/KT-18608natpryce
08/23/2017, 1:35 PMdmcg
08/23/2017, 4:34 PMnatpryce
08/24/2017, 7:39 AMdave
08/24/2017, 8:18 PMdmcg
08/27/2017, 11:43 AMyoavst
09/01/2017, 9:52 AMnatpryce
09/01/2017, 3:54 PM