Beginning cons-list
Defining fields of class directly in the primary constructor is more
concise and more scala idiomatic
Using generic types
Adding implementation to the cons-cell
Adding types
Creating singleton
Write a function nth that takes an integer n and a list and selects the nth elements of the lists. Elements are numbered from 0. If index is outside the range from 0 up to the length of the list minus one, an IndexOutOfBoundsException should be thrown.
misc functions on lists