101 return new List<A>(x1, of(x2, x3)); |
101 return new List<A>(x1, of(x2, x3)); |
102 } |
102 } |
103 |
103 |
104 /** Construct a list consisting of given elements. |
104 /** Construct a list consisting of given elements. |
105 */ |
105 */ |
|
106 @SuppressWarnings("varargs") |
106 public static <A> List<A> of(A x1, A x2, A x3, A... rest) { |
107 public static <A> List<A> of(A x1, A x2, A x3, A... rest) { |
107 return new List<A>(x1, new List<A>(x2, new List<A>(x3, from(rest)))); |
108 return new List<A>(x1, new List<A>(x2, new List<A>(x3, from(rest)))); |
108 } |
109 } |
109 |
110 |
110 /** |
111 /** |