UNPKG
lean4-code-actions
Version:
latest (1.1.32)
1.1.32
Refactorings and snippets for Lean 4
lean4-code-actions
/
libs
/
utils
/
array
/
startsWith.ts
6 lines
(4 loc)
•
220 B
text/typescript
View Raw
1
2
3
4
5
6
import
{
IsEqual
}
from
'../lodash'
export
const
startsWith = <T>
(
isEqual: IsEqual<T |
undefined
>
) =>
(
source: T[]
) =>
(
target: T[]
) =>
{
return
target.
every
(
(
value, index
) =>
isEqual
(target[index])(source[index])) }