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
maxWithConcur(fn, concurIterable)
maxWithConcur<
Value
>(fn
,concurIterable
):ConcurIterable
<Value
>
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.
Type Parameters
• Value
Parameters
• fn
• concurIterable: ConcurIterable
<Value
>
Returns
ConcurIterable
<Value
>
Example
console.log(
await pipe(
asConcur([`eating`, `sleeping`, `yawning`]),
maxWithConcur(value => value.length),
getConcur,
),
)
//=> sleeping
Defined in
maxWithConcur(fn)
maxWithConcur<
Value
>(fn
): (concurIterable
) =>ConcurIterable
<Value
>
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.
Type Parameters
• Value
Parameters
• fn
Returns
Function
Parameters
• concurIterable: ConcurIterable
<Value
>
Returns
ConcurIterable
<Value
>
Example
console.log(
await pipe(
asConcur([`eating`, `sleeping`, `yawning`]),
maxWithConcur(value => value.length),
getConcur,
),
)
//=> sleeping