I am following martin odesky course. And there is example where he applies flatMap to String and gets a string in return but I am getting a Vector. Here is the code that I am using
val str = "Hello"
println(str flatMap (x => List("." , x)))
output: Vector(., H, ., e, ., l, ., l, ., o)
outputExpected: .H.e.l.l.o.w