Skip to content

Instantly share code, notes, and snippets.

@Yuichiroh
Last active August 29, 2015 14: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 Yuichiroh/551a146d4e5b732186d7 to your computer and use it in GitHub Desktop.
Save Yuichiroh/551a146d4e5b732186d7 to your computer and use it in GitHub Desktop.
scala> util.Random.shuffle(1 to 3)
res0: scala.collection.immutable.IndexedSeq[Int] = Vector(2, 1, 3)
scala> util.Random.shuffle(1 until 3)
<console>:8: error: Cannot construct a collection of type scala.collection.AbstractSeq[Int] with elements of type Int based on a collection of type scala.collection.AbstractSeq[Int].
util.Random.shuffle(1 until 3)
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment