-
-
Save humblerookie/325712f8a2434f1a812b939a2d85b62f to your computer and use it in GitHub Desktop.
SAM Interfaces in Kotlin 1.4
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
//fun keyword is allowed on interfaces | |
fun interface Parser { | |
fun parse(value: String): ParsedOutput | |
} | |
data class ParsedOutput(val header: String, val body: String) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment