dbc0c592ab1431cb3c99f14861668d9c41294485 | ba9143a7234c742748a922ebf738afdf7874ce3f | ||
---|---|---|---|
48 | */ | 48 | */ |
49 | def apply(n: Int): A = { | 49 | def apply(n: Int): A = { |
50 | val rest = drop(n) | 50 | val rest = drop(n) |
51 | if (n < 0 || rest.isEmpty) throw new IndexOutOfBoundsException | 51 | if (n < 0 || rest.isEmpty) throw new IndexOutOfBoundsException("" + n) |
52 | rest.head | 52 | rest.head |
53 | } | 53 | } |
54 | 54 |