Skip to content

Instantly share code, notes, and snippets.

@alfonsogarsan
Last active April 22, 2020 15:13
Show Gist options
  • Save alfonsogarsan/20e7e160cf0a902853bff14a5c66f1cd to your computer and use it in GitHub Desktop.
Save alfonsogarsan/20e7e160cf0a902853bff14a5c66f1cd to your computer and use it in GitHub Desktop.
sealed class Result<T> {
data class Success<T>(val value: T) : Result<T>()
data class Failure<T>(val throwable: Throwable) : Result<T>()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment