enga
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

enga

Topple your call stack

Usage

import { Enga, EngaFunc, enga } from "enga";
import { AsyncEnga, AsyncEngaFunc, asyncEnga } from "enga/async";
import { Enga, enga } from "enga";

const countUp = (n: number): Enga<number> => enga(
  () => n === 0 ? 0 : countUp(n - 1),
  x => x + 1,
);

console.log(countUp(1000000).execute()) // 1000000

Readme

Keywords

none

Package Sidebar

Install

npm i enga

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

4.83 kB

Total Files

7

Last publish

Collaborators

  • tjjfvi