object Main extends App {
// Initialize a List equivalent to std::vector in C++
var list = List(1, 2, 3, 4, 5)
// Check if the list is not empty
if (list.nonEmpty) {
// Remove the first element
list = list.tail
}
// Print the updated list
println(list.mkString(" "))
}
/*
run:
2 3 4 5
*/