Why i am getting this type annotation difference in these below scenarios. For scenario 1
case class TestData(name : String , idNumber : Int)
val createRandomData : immutable.IndexedSeq[Int => TestData]= (0 to 2).map{
_ => TestData("something",_)
}
For scenario 2
case class TestData(name : String , idNumber : Int)
val createRandomData: immutable.Seq[TestData] = (0 to 2).map{
i => TestData("something",i)
}
Why in scenario 1 is return type is a function not a collection of Seq.