how to validate in scala code example Example: how to print in scala val x = List (2,4,7,8,9,10,12) val result = x.map(x=>x+5)