Created
December 13, 2017 11:37
-
-
Save fomkin/ede274cdb82cc1934178b532bf852eaa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val users = Vector( | |
"@demyanam1", | |
"@CipHuK", | |
"@sergey_samoylov", | |
"@ermakovolegs", | |
"@wouzar", | |
"@_sashashakun", | |
"@myBloodyScala", | |
"@lmnet89", | |
"@laughedelic", | |
"@noviiden", | |
"@AlexTyth", | |
"@danich3g", | |
"@yelbota", | |
"@ledostuff", | |
"@antonshwab", | |
"@titantins", | |
"@headstorn", | |
"@andreyshikov" | |
) | |
val random = new scala.util.Random(users.hashCode) | |
Seq | |
.fill(users.length)(random.nextInt(users.length)) | |
.distinct | |
.map(users.apply) | |
.zipWithIndex | |
.foreach { | |
case (name, index) => | |
println(s"${index + 1}. $name") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment