Skip to main content

Function: maxWithConcur()

Returns a concur iterable containing a maximum value of concurIterable by comparing the numerical values of each value, as defined by fn, if concurIterable contains at least one value. Otherwise, returns an empty concur iterable.

Example

console.log(
await pipe(
asConcur([`eating`, `sleeping`, `yawning`]),
maxWithConcur(value => value.length),
getConcur,
),
)
//=> sleeping

Since

v0.0.1

Call Signature

maxWithConcur<Value>(fn, concurIterable): ConcurOptional<Value>

Type Parameters

Value

Parameters

fn

(value) => MaybePromiseLike<number>

concurIterable

ConcurIterable<Value>

Returns

ConcurOptional<Value>

Defined in

statistics.d.ts:906

Call Signature

maxWithConcur<Value>(fn): (concurIterable) => ConcurOptional<Value>

Type Parameters

Value

Parameters

fn

(value) => MaybePromiseLike<number>

Returns

Function

Parameters

concurIterable

ConcurIterable<Value>

Returns

ConcurOptional<Value>

Defined in

statistics.d.ts:906