deno.land / x / rambda@v9.1.1 / src / findLast.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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}
rambda

Version Info

Tagged at
2 months ago