Skip to content

Instantly share code, notes, and snippets.

@sajjadyousefnia
Created April 2, 2018 09:46
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 sajjadyousefnia/3e99a578f6971c473918cec14e3c69f1 to your computer and use it in GitHub Desktop.
Save sajjadyousefnia/3e99a578f6971c473918cec14e3c69f1 to your computer and use it in GitHub Desktop.
// creates a immutable set of mixed types
val mixedTypesSet = setOf(2, 4.454, "how", "far", 'c') // will compile
var intSet: Set<Int> = setOf(1, 3, 4) // only integers types allowed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment