Skip to content

Instantly share code, notes, and snippets.

@coderitual

coderitual/curry.js

Created Mar 5, 2017
Embed
What would you like to do?
// Tiny, recursive autocurry
const curry = (
f, arr = []
) => (...args) => (
a => a.length === f.length ?
f(...a) :
curry(f, a)
)([...arr, ...args]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment