Skip to content

Instantly share code, notes, and snippets.

@rachelcarmena
rachelcarmena / curry.js
Created August 5, 2019 16:02
A possible curry function in JS
const curry = fn => {
const arity = fn.length;
const _curry = (...args) =>
args.length === arity
? fn(...args)
: arg => _curry(...args, arg);
return _curry();
}