The program successfully prints the 3,1,2 but I am curious about why it says that this expression is unused?
package Collection
object basics {
  def main(args: Array[String]): Unit = {
    var res = List[Int](1, 2)
    res.::=(3) // Unused expression without side effects 
    println(res.mkString(","))
  }
}
 
     
    
 
     
    