UNPKG

968 BJavaScriptView Raw
1var _checkForMethod =
2/*#__PURE__*/
3require("./internal/_checkForMethod");
4
5var _curry1 =
6/*#__PURE__*/
7require("./internal/_curry1");
8
9var slice =
10/*#__PURE__*/
11require("./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
41var tail =
42/*#__PURE__*/
43_curry1(
44/*#__PURE__*/
45_checkForMethod('tail',
46/*#__PURE__*/
47slice(1, Infinity)));
48
49module.exports = tail;
\No newline at end of file