1 | var _checkForMethod =
|
2 | /*#__PURE__*/
|
3 | require("./internal/_checkForMethod");
|
4 |
|
5 | var _curry1 =
|
6 | /*#__PURE__*/
|
7 | require("./internal/_curry1");
|
8 |
|
9 | var slice =
|
10 | /*#__PURE__*/
|
11 | require("./slice");
|
12 | /**
|
13 | * Returns all but the first element of the given list or string (or object
|
14 | * with a `tail` method).
|
15 | *
|
16 | * Dispatches to the `slice` method of the first argument, if present.
|
17 | *
|
18 | * @func
|
19 | * @memberOf R
|
20 | * @since v0.1.0
|
21 | * @category List
|
22 | * @sig [a] -> [a]
|
23 | * @sig String -> String
|
24 | * @param {*} list
|
25 | * @return {*}
|
26 | * @see R.head, R.init, R.last
|
27 | * @example
|
28 | *
|
29 | * R.tail([1, 2, 3]); //=> [2, 3]
|
30 | * R.tail([1, 2]); //=> [2]
|
31 | * R.tail([1]); //=> []
|
32 | * R.tail([]); //=> []
|
33 | *
|
34 | * R.tail('abc'); //=> 'bc'
|
35 | * R.tail('ab'); //=> 'b'
|
36 | * R.tail('a'); //=> ''
|
37 | * R.tail(''); //=> ''
|
38 | */
|
39 |
|
40 |
|
41 | var tail =
|
42 | /*#__PURE__*/
|
43 | _curry1(
|
44 | /*#__PURE__*/
|
45 | _checkForMethod('tail',
|
46 | /*#__PURE__*/
|
47 | slice(1, Infinity)));
|
48 |
|
49 | module.exports = tail; |
\ | No newline at end of file |