Scala head

scala> nums.head
res0: Int = 1

scala> names.head
res1: String = joel

It’s used to print the first element (the head element) of a list.

2443

2443

2443

2443

Scala head — Structure map

Clickable & Draggable!

Scala head — Related pages: