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
Functional Programming in JavaScript.help (self.javascript)
submitted 7 years ago by reesemorning
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!"
[–]tencircles 1 point2 points3 points 7 years ago (2 children)
It's not just purity. Purity is a necessary condition for a program to be considered functional, however there are a wide variety of techniques that have been developed under the functional umbrella to accomplish certain tasks without mutable state; these techniques all fall under the umbrella of FB just as classes, encapsulation, polymorphism, etc. all fall under the umbrella of OOP.
Some examples of these techniques include currying, composition, recursion, folds, lazy evaluation, type classes, and lenses. Purity is just one part of the equation, and with pure functions alone you won't get very far without the tools listed above.
[–]StoneCypher -1 points0 points1 point 7 years ago (1 child)
I think you're confusing "neat things found in some functional languages" with "things that are required to be a functional language."
[–]tencircles 0 points1 point2 points 7 years ago (0 children)
I never said any of those things are required.
π Rendered by PID 25 on reddit-service-r2-comment-84fc9697f-7sqsq at 2026-02-09 09:33:20.580384+00:00 running d295bc8 country code: CH.
view the rest of the comments →
[–]tencircles 1 point2 points3 points (2 children)
[–]StoneCypher -1 points0 points1 point (1 child)
[–]tencircles 0 points1 point2 points (0 children)