in scala
object Nil

case object Nil
extends List[All]
with ScalaObject
with CaseClass

The empty list.
Author:
Martin Odersky
Version:
1.0, 15/07/2003

Method Summary
final def head: All
     Returns this first element of the list.
final def isEmpty: Boolean
     Returns true if the list does not contain any elements.
final def tail: List[All]
     Returns this list without its first element.

Method Detail

isEmpty

  final def isEmpty: Boolean
Returns true if the list does not contain any elements.
Returns:
true, iff the list is empty.

head

  final def head: All
Returns this first element of the list.
Returns:
the first element of this list.
Throws:
java.lang.RuntimeException if the list is empty.

tail

  final def tail: List[All]
Returns this list without its first element.
Returns:
this list without its first element.
Throws:
java.lang.RuntimeException if the list is empty.