fx-flow v0.7.0 / pipe/strict / apply
Function: apply()
apply(fn, args)
apply<
A
,P
>(fn
,args
):ReturnType
<typeoffn
>
Apply function fn
to the arguments list args
.
Type parameters
• A extends AnyFunction
• P extends any
[]
Parameters
• fn: A
• args: P
Returns
ReturnType
<typeof fn
>
Example
typescript
apply(Math.max, [1, 2, 3, 4, 5]); // 5
Source
packages/core/src/pipe/strict/apply.ts:13
apply(fn)
apply<
A
,P
>(fn
): (args
) =>ReturnType
<typeoffn
>
Type parameters
• A extends AnyFunction
• P extends any
[]
Parameters
• fn: A
Returns
Function
Parameters
• args: P
Returns
ReturnType
<typeof fn
>