source: node_modules/ramda/src/dropRepeats.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 1.0 KB
Line 
1var _curry1 =
2/*#__PURE__*/
3require("./internal/_curry1.js");
4
5var _dispatchable =
6/*#__PURE__*/
7require("./internal/_dispatchable.js");
8
9var _xdropRepeatsWith =
10/*#__PURE__*/
11require("./internal/_xdropRepeatsWith.js");
12
13var dropRepeatsWith =
14/*#__PURE__*/
15require("./dropRepeatsWith.js");
16
17var equals =
18/*#__PURE__*/
19require("./equals.js");
20/**
21 * Returns a new list without any consecutively repeating elements.
22 * [`R.equals`](#equals) is used to determine equality.
23 *
24 * Acts as a transducer if a transformer is given in list position.
25 *
26 * @func
27 * @memberOf R
28 * @since v0.14.0
29 * @category List
30 * @sig [a] -> [a]
31 * @param {Array} list The array to consider.
32 * @return {Array} `list` without repeating elements.
33 * @see R.transduce
34 * @example
35 *
36 * R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2]
37 */
38
39
40var dropRepeats =
41/*#__PURE__*/
42_curry1(
43/*#__PURE__*/
44_dispatchable([], function () {
45 return _xdropRepeatsWith(equals);
46},
47/*#__PURE__*/
48dropRepeatsWith(equals)));
49
50module.exports = dropRepeats;
Note: See TracBrowser for help on using the repository browser.