Skip to content

Instantly share code, notes, and snippets.

@travisdachi
Last active August 13, 2016 15:24
Show Gist options
  • Save travisdachi/32b15916abd724b11740e0abf0261d6e to your computer and use it in GitHub Desktop.
Save travisdachi/32b15916abd724b11740e0abf0261d6e to your computer and use it in GitHub Desktop.
data class Present(var id: String = "", var toy: String = "", var kid: String = "", var given: Boolean = false)
val list: MutableList<Present> = mutableListOf(
Present("p0", "Dinosaur Figure", "Ralph", true),
Present("p1", "Teddy Bear", "Ginger"),
Present("p2", "Teddy Bear", "Cherry")
)
list[3] = Present("p3", "Pony Plush", "Cherry")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment