Last active
November 27, 2017 08:59
-
-
Save sliskiCode/29fd89fed2991c03b13d3d879b1ded18 to your computer and use it in GitHub Desktop.
6 magic sugars that can make your Kotlin codebase happier #3
This file contains hidden or 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
fun sugar(response: Response) = when (response) { | |
is Success -> ... | |
is Error -> ... | |
Timeout -> ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment