Skip to content

Instantly share code, notes, and snippets.

@navi25
Created January 22, 2019 19:40
Show Gist options
  • Save navi25/4229405984d32b677359b24932eec446 to your computer and use it in GitHub Desktop.
Save navi25/4229405984d32b677359b24932eec446 to your computer and use it in GitHub Desktop.
sealed class Result<out T: Any> {
data class Success<out T : Any>(val data: T) : Result<T>()
data class Error(val exception: Exception) : Result<Nothing>()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment