Skip to content

Instantly share code, notes, and snippets.

@cassiozen
Created November 29, 2018 00:22
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 cassiozen/afd8804870f6475d577ecfe881e76448 to your computer and use it in GitHub Desktop.
Save cassiozen/afd8804870f6475d577ecfe881e76448 to your computer and use it in GitHub Desktop.
fun weatherReport(location) {
// Make an Ajax request to fetch the weather...
return Pair(72, "Mostly Sunny") // Pair is a standard class in Kotlin that represents a generic pair of two values
}
val (temp, forecast) = weatherReport("Berkeley, CA")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment