1 | var lift =
|
2 | /*#__PURE__*/
|
3 | require("./lift");
|
4 |
|
5 | var not =
|
6 | /*#__PURE__*/
|
7 | require("./not");
|
8 | /**
|
9 | * Takes a function `f` and returns a function `g` such that if called with the same arguments
|
10 | * when `f` returns a "truthy" value, `g` returns `false` and when `f` returns a "falsy" value `g` returns `true`.
|
11 | *
|
12 | * `R.complement` may be applied to any functor
|
13 | *
|
14 | * @func
|
15 | * @memberOf R
|
16 | * @since v0.12.0
|
17 | * @category Logic
|
18 | * @sig (*... -> *) -> (*... -> Boolean)
|
19 | * @param {Function} f
|
20 | * @return {Function}
|
21 | * @see R.not
|
22 | * @example
|
23 | *
|
24 | * const isNotNil = R.complement(R.isNil);
|
25 | * isNil(null); //=> true
|
26 | * isNotNil(null); //=> false
|
27 | * isNil(7); //=> false
|
28 | * isNotNil(7); //=> true
|
29 | */
|
30 |
|
31 |
|
32 | var complement =
|
33 | /*#__PURE__*/
|
34 | lift(not);
|
35 | module.exports = complement; |
\ | No newline at end of file |