Skip to content

Instantly share code, notes, and snippets.

@humblerookie
Last active July 17, 2020 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save humblerookie/325712f8a2434f1a812b939a2d85b62f to your computer and use it in GitHub Desktop.
Save humblerookie/325712f8a2434f1a812b939a2d85b62f to your computer and use it in GitHub Desktop.
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