effect-io-ai

Package: effect
Module: Function

Function.apply

Apply a function to given values.

Example

import * as assert from "node:assert"
import { pipe, apply } from "effect/Function"
import { length } from "effect/String"

assert.deepStrictEqual(pipe(length, apply("hello")), 5)

Signature

declare const apply: <A extends ReadonlyArray<unknown>>(...a: A) => <B>(self: (...a: A) => B) => B

Source

Since v2.0.0