@pakal/curry
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

@pakal/curry

Source Code Version MIT License Bundle Size TypeScript

Curry is package from Pakal library

Install

$ yarn add @pakal/curry

Or

$ npm install --save @pakal/curry

Use

Module

import {
  IPlaceholder,
  __,
  CurriedFn,
  CurriedFn2,
  CurriedFn3,
  CurriedFn4,
  CurriedFn5,
  default as curry
} from '@pakal/curry';

Browser

<script src="https://unpkg.com/@pakal/curry/bundle.umd.min.js"></script>
let {
  __,
  curry
} = _;

Examples

 let multiply = (a, b)=> a * b;

 let multiplyCurried = curry(multiply);

 multiplyCurried()(2)()(4); // => 8
 let fn = (a, b, c, d, e) => [a, b, c, d, e];

 let curriedFn = curry(fn);

 curriedFn(__, __, 1, __, 2)(__, 3)(4, 5); // => [4, 3, 1, 5, 2]

License

Copyright © Yisrael Eliev, Licensed under the MIT license.

Package Sidebar

Install

npm i @pakal/curry

Weekly Downloads

9

Version

0.2.1

License

MIT

Unpacked Size

57.1 kB

Total Files

15

Last publish

Collaborators

  • yisraelx