[scala] What is the apply function in Scala?