Skip to content

Instantly share code, notes, and snippets.

@humblerookie

humblerookie/Parser.kt Secret

Last active Jul 17, 2020
Embed
What would you like to do?
SAM Interfaces in Kotlin 1.4
//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
You can’t perform that action at this time.