Skip to content

Instantly share code, notes, and snippets.

@raamcosta
Created November 27, 2021 16:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save raamcosta/18072e436b7bd69a54298a7037335459 to your computer and use it in GitHub Desktop.
sealed class Result<out S, out E> {
data class Success<out S>(val data: S) : Result<S, Nothing>()
data class Error<out E>(val error: E) : Result<Nothing, E>()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment