Created
October 20, 2018 03:27
-
-
Save timusus/b167bfe36c161579180126882972eb7d to your computer and use it in GitHub Desktop.
Sealed Class Snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed class Result<out T> { | |
data class Success<out T>(val data: T?) : Result<T>() | |
data class Failure(val error: Error) : Result<Nothing>() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment