<A, B>(_: A, b: B): BReturns the second argument and discards the first. The SK combinator is a fundamental combinator in the lambda calculus and the SKI combinator calculus.
When to use
Use to discard the first argument and return the second argument.
Example (Discarding the first argument)
import { Function } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(Function.SK(0, "hello"), "hello")combinators
Source effect/Function.ts:13791 lines
export const const SK: <A, B>(_: A, b: B) => BReturns the second argument and discards the first. The SK combinator is
a fundamental combinator in the lambda calculus and the SKI combinator
calculus.
When to use
Use to discard the first argument and return the second argument.
Example (Discarding the first argument)
import { Function } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(Function.SK(0, "hello"), "hello")
SK = <function (type parameter) A in <A, B>(_: A, b: B): BA, function (type parameter) B in <A, B>(_: A, b: B): BB>(_: A_: function (type parameter) A in <A, B>(_: A, b: B): BA, b: Bb: function (type parameter) B in <A, B>(_: A, b: B): BB): function (type parameter) B in <A, B>(_: A, b: B): BB => b: Bb