deno.land / x / rambda@v9.1.1 / source / find.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
export function find(predicate, list){ if (arguments.length === 1) return _list => find(predicate, _list)
let index = 0 const len = list.length
while (index < len){ const x = list[ index ] if (predicate(x)){ return x }
index++ }}
rambda

Version Info

Tagged at
2 months ago