Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rambda/immutable.d.ts>find

Faster and smaller alternative to Ramda
Latest
function find
import { find } from "https://deno.land/x/rambda@9.4.1/immutable.d.ts";

It returns the first element of list that satisfy the predicate.

If there is no such element, it returns undefined.

Parameters

predicate: (x: T) => boolean
list: readonly T[]

Returns

T | undefined

Parameters

predicate: (x: T) => boolean

Returns

(list: readonly T[]) => T | undefined