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:
725 bytes
|
Line | |
---|
1 | var _curry1 =
|
---|
2 | /*#__PURE__*/
|
---|
3 | require("./internal/_curry1.js");
|
---|
4 | /**
|
---|
5 | * Returns a function that always returns the given value. Note that for
|
---|
6 | * non-primitives the value returned is a reference to the original value.
|
---|
7 | *
|
---|
8 | * This function is known as `const`, `constant`, or `K` (for K combinator) in
|
---|
9 | * other languages and libraries.
|
---|
10 | *
|
---|
11 | * @func
|
---|
12 | * @memberOf R
|
---|
13 | * @since v0.1.0
|
---|
14 | * @category Function
|
---|
15 | * @sig a -> (* -> a)
|
---|
16 | * @param {*} val The value to wrap in a function
|
---|
17 | * @return {Function} A Function :: * -> val.
|
---|
18 | * @example
|
---|
19 | *
|
---|
20 | * const t = R.always('Tee');
|
---|
21 | * t(); //=> 'Tee'
|
---|
22 | */
|
---|
23 |
|
---|
24 |
|
---|
25 | var always =
|
---|
26 | /*#__PURE__*/
|
---|
27 | _curry1(function always(val) {
|
---|
28 | return function () {
|
---|
29 | return val;
|
---|
30 | };
|
---|
31 | });
|
---|
32 |
|
---|
33 | module.exports = always; |
---|
Note:
See
TracBrowser
for help on using the repository browser.