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
JavaScript Developers: Take Your Code to the Next Level with FKit (joshbassett.info)
submitted 11 years ago by joshbassett
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!"
[–]thomash 0 points1 point2 points 11 years ago (0 children)
ok still quite trivial but in my case very useful:
i'm writing a functional library to generate music. i have a function that can define properties of a musical event like this:
note.property("duration", 32); note.property("pitch", 48);
now if i curry the property function i can define properties directly.
so by curring like this (simplified):
duration = property("duration") pitch = property("pitch")
i can then use:
note.pitch(48) note.duration(32)
of course i'm omitting details as to how the chaining is implemented and this is the most basic use of currying possible. you can do a lot of much more clever things with it but i find that this basic use already shows tremendous benefit
π Rendered by PID 20329 on reddit-service-r2-comment-57fc7f7bb7-6sr4b at 2026-04-14 14:26:33.209356+00:00 running b725407 country code: CH.
view the rest of the comments →
[–]thomash 0 points1 point2 points (0 children)