@SafeVarargs public static <T>T[] prepend(T first,T... rest){
  T[] newArray=createWithSameComponentType(rest.length + 1,rest);
  newArray[0]=first;
  System.arraycopy(rest,0,newArray,1,rest.length);
  return newArray;
}

@ SafeVarargs public static < T > T [ ] prepend ( T first , T ... rest ) { T [ ] newArray = createWithSameComponentType ( rest . length + 1 , rest ) ; newArray [ 0 ] = first ; System . arraycopy ( rest , 0 , newArray , 1 , rest . length ) ; return newArray ; }
creates a new array with given first element prepended to given rest array .
