UNPKG
@prelude/cmp
Version:
latest (4.2.0)
4.2.0
4.1.0
4.0.0
3.0.0
2.0.0
1.5.0
1.4.3
1.4.2
1.4.1
1.4.0
1.3.1
1.3.0
1.2.0
1.1.0
1.0.0
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.2
Cmp module.
@prelude/cmp
/
src
/
equal.ts
10 lines
(7 loc)
•
240 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{
type
Cmp
, eq }
from
'./prelude.js'
/**
@returns
predicate function returning `true` if elements are equal, `false` otherwise. */
const
equal = <T>
(
cmp
:
Cmp
<T>
) =>
(
a
: T,
b
: T
) =>
cmp
(a, b) === eq
export
default
equal