private static <T>List<T> rest(List<T> list){
  return list.subList(1,list.size());
}

private static < T > List < T > rest ( List < T > list ) { return list . subList ( 1 , list . size ( ) ) ; }
convenience function . operates on a list and returns a list containing all elements but the first .
