Skip to content

h4rikris/JS-Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JS-Examples

Collections of JS examples

Curry implementation using recursion

const curry = (fn, ...args) => fn.length === args.length ?
  fn(...args) : (...remainingArgs) => curry(fn, ...args, ...remainingArgs);

const add = (a,b) => a + b;
console.log(curry(add, 1, 2))
console.log(curry(add, 1)(2))
console.log(curry(add)(1)(2))

About

Collections of JS examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published