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:
726 bytes
|
Line | |
---|
1 | var _concat =
|
---|
2 | /*#__PURE__*/
|
---|
3 | require("./internal/_concat.js");
|
---|
4 |
|
---|
5 | var _curry2 =
|
---|
6 | /*#__PURE__*/
|
---|
7 | require("./internal/_curry2.js");
|
---|
8 | /**
|
---|
9 | * Returns a new list with the given element at the front, followed by the
|
---|
10 | * contents of the list.
|
---|
11 | *
|
---|
12 | * @func
|
---|
13 | * @memberOf R
|
---|
14 | * @since v0.1.0
|
---|
15 | * @category List
|
---|
16 | * @sig a -> [a] -> [a]
|
---|
17 | * @param {*} el The item to add to the head of the output list.
|
---|
18 | * @param {Array} list The array to add to the tail of the output list.
|
---|
19 | * @return {Array} A new array.
|
---|
20 | * @see R.append
|
---|
21 | * @example
|
---|
22 | *
|
---|
23 | * R.prepend('fee', ['fi', 'fo', 'fum']); //=> ['fee', 'fi', 'fo', 'fum']
|
---|
24 | */
|
---|
25 |
|
---|
26 |
|
---|
27 | var prepend =
|
---|
28 | /*#__PURE__*/
|
---|
29 | _curry2(function prepend(el, list) {
|
---|
30 | return _concat([el], list);
|
---|
31 | });
|
---|
32 |
|
---|
33 | module.exports = prepend; |
---|
Note:
See
TracBrowser
for help on using the repository browser.