     if !this.tail().isEmpty() 
       this.cons(this.tail().first().get(), this.tail().tail)
     else
-      new Nil
+      new List()
   else 
     this.cons(this.head(), this.tail().remove(index-1))
       

  @return {List} A new list containing the elements of the appended List and the elements of the original List.
###
List.prototype.appendList = (list) -> 
  this.cons(this.head(), this.tail().appendList(list))
    
###*
  Creates a new list by copying all of the items in the argument 'list'

      f(__foldRight(xs.tail()), xs.head())
  __foldRight(this) 

if exports?
  exports.List = List