Ask Your Question
0

Why doesn't the use of generic and ramda library's curry() together result in the application of generic?

asked 2022-12-09 11:00:00 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-08-18 05:00:00 +0000

lalupa gravatar image

The reason why the use of generic and Ramda library's curry() together doesn't result in the application of generic is because curry() is a specific function that only works with Ramda's functional programming paradigm. On the other hand, generic is a generic utility library that works with any programming paradigm. The two libraries have different design patterns and philosophies, which makes it difficult to combine them seamlessly.

Currying is a technique used in functional programming that allows us to partially apply a function's arguments and return a new function that takes the remaining arguments. This technique is useful for creating reusable functions that can be composed with other functions. Ramda's curry() function works by returning a new curried function that takes its arguments one at a time.

Generic, on the other hand, is a library that provides utility functions for all JavaScript developers, regardless of their programming paradigm. It provides a set of functions that can be used to perform common tasks, such as manipulating arrays, strings, and objects.

While it's certainly possible to use curry() with generic, there's no guarantee that the two libraries will work seamlessly together. This is because they have different design patterns and philosophies, which can lead to unexpected behavior when used together. In general, it's best to use libraries that are designed to work together, rather than trying to mix and match unrelated libraries.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-12-09 11:00:00 +0000

Seen: 10 times

Last updated: Aug 18 '21