型推論が不思議で寝不足になりそうです;;

val randomVariables = for (i <- 1 to 100) yield {
if (i < 10) {
r.nextInt(10000)
} else {
r.nextDouble()
}
}