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 | |
---|
1 | var _curry1 =
|
---|
2 | /*#__PURE__*/
|
---|
3 | require("./internal/_curry1.js");
|
---|
4 |
|
---|
5 | var _makeFlat =
|
---|
6 | /*#__PURE__*/
|
---|
7 | require("./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 |
|
---|
27 | var flatten =
|
---|
28 | /*#__PURE__*/
|
---|
29 | _curry1(
|
---|
30 | /*#__PURE__*/
|
---|
31 | _makeFlat(true));
|
---|
32 |
|
---|
33 | module.exports = flatten; |
---|
Note:
See
TracBrowser
for help on using the repository browser.