Let's say I have this ListBuffer that I am filling in a scala foreach like the following:
Tokens.foreach(t => tokens+=new Token(t._1.toString()))
Tokens.foreach(t => tokens+=new Token(t._1.toString()), posTagString+=t._2.toString())
for(x<-Tokens){
}
try this? :
Tokens.foreach{t =>
tokens+=new Token(t._1.toString())
posTagString+=t._2.toString()
}