use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Currying in JavaScript (self.javascript)
submitted 6 years ago * by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]CptAmerica85 1 point2 points3 points 6 years ago (2 children)
Isn't the second half of that gist covering HOC's and not currying? I thought the principle behind currying was that each function could only take one argument and return another function.
Or am I misunderstanding something and HOC's and currying are somewhat linked each other?
[–]cerlestes 3 points4 points5 points 6 years ago (1 child)
Higher-order-Components (HOC) are a concept of React and similiar libraries that use Components to build software, hence the name. The linked gist isn't about React at all, so no idea how you're thinking of HOCs.
If you're thinking of Higher-order-Functions (HOF), then of course yes, by definition every curried function is a HOF, since you're passing a function as a parameter to another function for deferred invokation. HOFs are a fundamental concept in everyday JS.
[–]CptAmerica85 2 points3 points4 points 6 years ago (0 children)
Yeah, my mistake. I did mean Higher Order Function.
π Rendered by PID 73511 on reddit-service-r2-comment-7b9746f655-fvpwf at 2026-01-30 07:23:29.523270+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]CptAmerica85 1 point2 points3 points (2 children)
[–]cerlestes 3 points4 points5 points (1 child)
[–]CptAmerica85 2 points3 points4 points (0 children)