Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
val r1 = scala.util.Random
println(r1.nextPrintableChar)
println(r1.nextPrintableChar)
var range = 0 to r1.nextInt(10)
println(range)
range = 0 to r1.nextInt(10)
println(range)
println(for (i <- 0 to r1.nextInt(10)) yield i * 2)
println(for (i <- 0 to r1.nextInt(10)) yield (i * r1.nextFloat))
println(for (i <- 0 to r1.nextInt(10)) yield r1.nextPrintableChar)
println(for (i <- 1 to 5) yield r1.nextInt(100))
println(for (i <- 1 to 5) yield r1.nextInt(100))
println(for (i <- 1 to 5) r1.nextInt(100))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.