At the moment I have a method that prints Ints
def printList(args: List[Int]): Unit = {
args.foreach(println)
}
How do I modify this so it is flexible enough to print a list of anything?
At the moment I have a method that prints Ints
def printList(args: List[Int]): Unit = {
args.foreach(println)
}
How do I modify this so it is flexible enough to print a list of anything?