Skip to content

Instantly share code, notes, and snippets.



Last active Sep 14, 2018
What would you like to do?
rest - decorate functions so you can bind "rest" arguments with
// Decorate a function with a method that allows you to bind "rest" args
// (everything except the first argument).
// Usage:
// const f = rest((a, b, c) => a + b + c)
// const fbc ="b", "c")
// fbc("a")
// // "abc"
const rest = f => { = ( => v => f(v,
return f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.