Skip to content

Optimized utility to currify any function 🔥

License

Notifications You must be signed in to change notification settings

kozlown/super-curry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

super-curry Build Status

Optimized utility to currify any function.

Examples

See it in action here

import curry from 'super-curry'

const linear = curry(
  (a, x, b) => a * x + b
)

// it can be called normally
console.info(linear(2, 6, 3))
// 2 * 6 + 3 = 15

// with simple partial application
const linearBy4 = linear(4)
console.info(linearBy4(5, 2))
// 4 * 5 + 2 = 22

// or with placeholder(s)
const linearBy4Plus2 = linear(4, curry, 2)
// linearBy4(curry, 2) works too
console.info(linearBy4Plus2(6))
// 4 * 6 + 2 = 26

Releases

No releases published

Packages

No packages published