Hyperlinkv0.8.0-beta.28

Function

Function.FunctionTypeLambdainterfaceeffect/Function.ts:35
FunctionTypeLambda

Type lambda for function types, used for higher-kinded type operations.

When to use

Use when defining higher-kinded abstractions that must accept function types as one of their type-lambda inputs.

Example (Creating a function type with a type lambda)

import type { Function, HKT } from "effect"

// Create a function type using the type lambda
type StringToNumber = HKT.Kind<Function.FunctionTypeLambda, string, never, never, number>
// Equivalent to: (a: string) => number
type lambdas
Source effect/Function.ts:353 lines
export interface FunctionTypeLambda extends TypeLambda {
  readonly type: (a: this["In"]) => this["Target"]
}