recur-fn
v1.0.1
Published
Recursive Arrow Functions
Downloads
6
Readme
Recursive Arrow Functions for JavaScript
Installation
npm install recur-fn
Usage
const rec = require('recur-fn')
const factorial = rec((f,n) => (n>1 ? n*f(n-1) : n))
factorial(6) // 720
Acknowledgement
Inspired by a post on esdiscuss.org on recursive arrow functions.