Aditya Loshali
Sep 3 · 1 min read

Clear and Concise. Such a great article.

Although i get the difference between currying and partial application but i don’t quite understand the difference between in uses such as composition.
The functions in composition pipeline expect a unary data flow. but we can create that using partial application too. using the data last concept.

const getUserAddress = compose(
displayResponse,
either('User does not exist', prop('address')),
getUser
)

where either is partially applied the failure message and the success function to retrieve address string. and the last value it expects is ‘data’ of user. so why curry ?

    Aditya Loshali

    Written by

    I’m a full stack web developer working with Javascript on React and Node.js everyday.