Package: effect
Module: Function
Reverses the order of arguments for a curried function.
Example
import * as assert from "node:assert"
import { flip } from "effect/Function"
const f = (a: number) => (b: string) => a - b.length
assert.deepStrictEqual(flip(f)('aaa')(2), -1)
Signature
declare const flip: <A extends Array<unknown>, B extends Array<unknown>, C>(f: (...a: A) => (...b: B) => C) => (...b: B) => (...a: A) => C
Since v2.0.0