P01

ninetynine.P01
object P01

P01 - find last element of a list.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
P01.type

Members list

Value members

Concrete methods

def last[A](l: List[A]): A

Do a recursive pattern match to find last element of a list.

Do a recursive pattern match to find last element of a list.

Value parameters

l

the list to process

Attributes

Returns

the last element of the list l

Throws
java.lang.RuntimeException

when hitting unexpected case

Version

0.1.0

Since

0.1.0

Todo

nothing

Note

asserts that list is not empty

def last_[A](l: List[A]): A

Attributes

Concrete fields

val logger: Logger