
export function _curry(fn: (...args: any[]) => any) {
    return (...args: any[]) => {
        if (fn.length > args.length) {
            return (...nextArgs: any[]) => (curry(fn) as any)(...args, ...nextArgs);
        }
        return fn(...args);
    };
}

export interface Curry2<P1, P2, R> {