Skip to main content
Module

x/rambda/index.d.ts>find

Faster and smaller alternative to Ramda
Go to Latest
function find
import { find } from "https://deno.land/x/rambda@v7.0.1/index.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: T[]

Returns

T | undefined

Parameters

predicate: (x: T) => boolean

Returns

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