Skip to content

Instantly share code, notes, and snippets.

@seanghay
Last active January 17, 2023 08:37
Show Gist options
  • Save seanghay/03e70631cb036a51733cecbc5c374afd to your computer and use it in GitHub Desktop.
Save seanghay/03e70631cb036a51733cecbc5c374afd to your computer and use it in GitHub Desktop.
/* Copyright 2020 Seanghay Yath (@seanghay)
SPDX-License-Identifier: Apache-2.0 */
sealed class ResultOf<out T> {
data class Success<out R>(val value: R): ResultOf<R>()
data class Failure(
val message: String?,
val throwable: Throwable?
): ResultOf<Nothing>()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment