Flips two arguments of the function.
The function with two arguments.
The function flipped the arguments.
const fn = flip((a: string) => (b: string) => a + b);expect(fn("a")("b")).toStrictEqual("ba");expect(fn("asd")("btg")).toStrictEqual("btgasd"); Copy
const fn = flip((a: string) => (b: string) => a + b);expect(fn("a")("b")).toStrictEqual("ba");expect(fn("asd")("btg")).toStrictEqual("btgasd");
Flips two arguments of the function.