fup-curry-limit-reverse-core
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

CurryLimitReverse

install

npm i --save fup-curry-limit-reverse-core

Use

const curryLimitReverseCore = require('fup-curry-limit-reverse-core');

or es module

import curryLimitReverseCore from 'fup-curry-limit-reverse-core';

Example

const sum    = (...nums) => nums
  .reduce((added, num) => added + num, 0); 
const sum2   = curryLimitReverseCore(2, sum); // (y, x) => y + x | y => x => y + x
const add1   = sum2(1);                       // (x) => 1 + x
const result = add1(2);                       // 3
const x      = sum2(10, 20);                  // 30

Readme

Keywords

Package Sidebar

Install

npm i fup-curry-limit-reverse-core

Weekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

3.01 kB

Total Files

4

Last publish

Collaborators

  • dasx10