0.1.6 • Published 4 years ago

reason-memoize v0.1.6

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

reason-memoize

ReasonML simple memoization utility

Install

npm install --save reason-memoize

Add reason-memoize to bs-dependencies in bsconfig.json

Usage

let expensiveFn = () => 1;
let execOnce = Memoize.memoize0(expensiveFn);

execOnce(); /* New */
execOnce(); /* Memoized */
let add1 = x => x + 1;
let memoizedAdd1 = Memoize.memoize1(add1);

memoizedAdd1(10); /* New */
memoizedAdd1(10); /* Memoized */
let plus = (x, y) => x + y;
let memoizedPlus = Memoize.memoize2(plus);

memoizedPlus(10, 20); /* New */
memoizedPlus(10, 20); /* Memoized */

🐪 Employment Hero ReasonML adventurer group

6569.jpg

  • We are exploring the potential of ReasonML and its application practically for Employment Hero R&D projects
  • Exposure ourselves to FP paradigm
  • An early attempt to build core members for the first ReasonML community in Saigon/VN
0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago