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:
915 bytes
|
Rev | Line | |
---|
[d24f17c] | 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 containing the contents of the given list, followed by
|
---|
| 10 | * the given element.
|
---|
| 11 | *
|
---|
| 12 | * @func
|
---|
| 13 | * @memberOf R
|
---|
| 14 | * @since v0.1.0
|
---|
| 15 | * @category List
|
---|
| 16 | * @sig a -> [a] -> [a]
|
---|
| 17 | * @param {*} el The element to add to the end of the new list.
|
---|
| 18 | * @param {Array} list The list of elements to add a new item to.
|
---|
| 19 | * list.
|
---|
| 20 | * @return {Array} A new list containing the elements of the old list followed by `el`.
|
---|
| 21 | * @see R.prepend
|
---|
| 22 | * @example
|
---|
| 23 | *
|
---|
| 24 | * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests']
|
---|
| 25 | * R.append('tests', []); //=> ['tests']
|
---|
| 26 | * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']]
|
---|
| 27 | */
|
---|
| 28 |
|
---|
| 29 |
|
---|
| 30 | var append =
|
---|
| 31 | /*#__PURE__*/
|
---|
| 32 | _curry2(function append(el, list) {
|
---|
| 33 | return _concat(list, [el]);
|
---|
| 34 | });
|
---|
| 35 |
|
---|
| 36 | module.exports = append; |
---|
Note:
See
TracBrowser
for help on using the repository browser.