Skip to main content
Module

x/fae/lift.ts

A functional module for Deno inspired from Ramda.
Latest
File
// Copyright (c) 2020 Jozty. All rights reserved. MIT license.
import curryN from './utils/curry_n.ts';import type { Func } from './utils/types.ts';import { liftN } from './liftN.ts';import { getFunctionLength } from './utils/get.ts';
// @typestype Lift = (f: Func) => Func;
function _lift(f: Func) { return liftN(getFunctionLength(f), f);}
export const lift: Lift = curryN(1, _lift);