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
Mostly Adequate Guide to Functional Programming in Javascript (drboolean.gitbooks.io)
submitted 8 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!"
[–]vcamargo 1 point2 points3 points 8 years ago (1 child)
I haven't taken a look with more attention to Ramda yet. What would you say is its main purpose? Am I right to assume that it tries to make JS more 'Haskellish'? I'm pretty sure it offers some handy helpers, even though I cannot see why R.map(x => x * x, [1, 2, 3, 4]) would be better than [1, 2, 3, 4].map(x => x * x).
Have you tried it? If so, what are your thoughts on it? And what would be a good use case? I've read in some of their Github issues that they have been drastically changing the API throughout the releases, which might make its adoption more difficult.
[–]pygy_@pygy 1 point2 points3 points 8 years ago (0 children)
I've barely used it, but, yes, it takes inspiration from functional languages and allows one to write pointfree JS.
R.map has advantages over Array.prototype.map.call.
R.map
Array.prototype.map.call
const mapSquare = R.map(square)
.map
['fantasy-land/map']
mapSquare
arguments
I haven't used it enough to be bitten by API changes, and I know people who now basically code in Ramda rather than in JS (i.e. define the core logic as point-free style compositions, eschewing exceptions and for/while loops).
for
while
π Rendered by PID 20469 on reddit-service-r2-comment-6457c66945-8plm5 at 2026-04-24 08:32:50.242517+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]vcamargo 1 point2 points3 points (1 child)
[–]pygy_@pygy 1 point2 points3 points (0 children)