Build curried functions

Share this video with your friends

Send Tweet

We see what it means to curry a function, then walk through several examples of curried functions and their use cases.

Leonid
Leonid
~ 7 years ago
const modulo = dvr => dvd => dvd % dvr

How can I flip this function? (flip(modulo) would be equal to dvd => dvr => dvd % dvr)

Leonid
Leonid
~ 7 years ago

It can be:

const flip = fn => second => first => fn(first)(second);