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:
582 bytes
|
Line | |
---|
1 | import _curry3 from "./internal/_curry3.js";
|
---|
2 | import equals from "./equals.js";
|
---|
3 | /**
|
---|
4 | * Takes a function and two values in its domain and returns `true` if the
|
---|
5 | * values map to the same value in the codomain; `false` otherwise.
|
---|
6 | *
|
---|
7 | * @func
|
---|
8 | * @memberOf R
|
---|
9 | * @since v0.18.0
|
---|
10 | * @category Relation
|
---|
11 | * @sig (a -> b) -> a -> a -> Boolean
|
---|
12 | * @param {Function} f
|
---|
13 | * @param {*} x
|
---|
14 | * @param {*} y
|
---|
15 | * @return {Boolean}
|
---|
16 | * @example
|
---|
17 | *
|
---|
18 | * R.eqBy(Math.abs, 5, -5); //=> true
|
---|
19 | */
|
---|
20 |
|
---|
21 | var eqBy =
|
---|
22 | /*#__PURE__*/
|
---|
23 | _curry3(function eqBy(f, x, y) {
|
---|
24 | return equals(f(x), f(y));
|
---|
25 | });
|
---|
26 |
|
---|
27 | export default eqBy; |
---|
Note:
See
TracBrowser
for help on using the repository browser.