Sign in
chromium
/
external
/
github.com
/
SeleniumHQ
/
selenium
/
refs/heads/api-docs-4.30.0-all
/
.
/
node_modules
/
rambda
/
src
/
findLast.js
blob: 7bac275cea81291575cb25b56dc26b022754076a [
file
] [
log
] [
blame
] [
edit
]
export
function
findLast
(
predicate
,
list
){
if
(
arguments
.
length
===
1
)
return
_list
=>
findLast
(
predicate
,
_list
)
let index
=
list
.
length
while
(--
index
>=
0
){
if
(
predicate
(
list
[
index
])){
return
list
[
index
]
}
}
return
undefined
}