Scala tail

scala> nums.tail
res0: List[Int] = List(2, 3, 4, 5, 6, 7, 8, 9, 10)

scala> names.tail
res1: List[String] = List(ed, chris, maurice)

It’s used to print every element in a list after the head element.

Related concepts

Scala tail — Structure map

Clickable & Draggable!

Scala tail — Related pages: