Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currying #300

Open
fabiante opened this issue Apr 22, 2017 · 2 comments
Open

Currying #300

fabiante opened this issue Apr 22, 2017 · 2 comments

Comments

@fabiante
Copy link

Hi guys,

I've got a suggestion for the js pattern section:

Yesterday I learned about currying. Maybe this could be usefull to be included. I included a list of sources that might be interesting:

https://www.sitepoint.com/currying-in-functional-javascript/
https://www.youtube.com/watch?v=iZLP4qOwY8I
https://medium.com/@kbrainwave/currying-in-javascript-ce6da2d324fe

Cheers
Really love your website, helps me a lot

@allanesquina
Copy link
Contributor

Hey @Fabitee, sorry the delay.
Yea it could be very useful for sure. Let me know if you want to put that content by your self so that you can become a contributor.
Thanks and welcome! 👍

@fabiante
Copy link
Author

fabiante commented May 8, 2017

@allanesquina I'd love to contribute but since I just got into the topic I don't think I'm overly qualified to find the perfect resources for this topic. Thing is, I found two ways people tend to curry stuff:

  1. Breaking down a function with multiple arguments into several functions with one argument each. A simple JSFiddle example.
  2. Object methods return the object itself so the functions can be chained together. JSFiddle right here.

I am unsure if version 2 really is currying or something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants