source: node_modules/ramda/src/flatten.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: 683 bytes
Line 
1var _curry1 =
2/*#__PURE__*/
3require("./internal/_curry1.js");
4
5var _makeFlat =
6/*#__PURE__*/
7require("./internal/_makeFlat.js");
8/**
9 * Returns a new list by pulling every item out of it (and all its sub-arrays)
10 * and putting them in a new array, depth-first.
11 *
12 * @func
13 * @memberOf R
14 * @since v0.1.0
15 * @category List
16 * @sig [a] -> [b]
17 * @param {Array} list The array to consider.
18 * @return {Array} The flattened list.
19 * @see R.unnest
20 * @example
21 *
22 * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]);
23 * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
24 */
25
26
27var flatten =
28/*#__PURE__*/
29_curry1(
30/*#__PURE__*/
31_makeFlat(true));
32
33module.exports = flatten;
Note: See TracBrowser for help on using the repository browser.