You are viewing a single thread.
View all comments
29 points

x is used for map, filter, etc. a and b are used for sorts, comparisons and merges. y might be used if I’m doing multiple lambda expressions (but that means I’m in a bad place already). I have no idea why, but these are firm rules in my brain.

permalink
report
reply
12 points

I’ve gotten used to using the singular form as in…

records.filter((record) => …)

Not saying this way is better but it works for me.

permalink
report
parent
reply
2 points

I do this too. I hate using just x, because it’s so non-descriptive.

permalink
report
parent
reply
1 point

Yes! I love using x (and xs) for functions over whatever the thing is (or things are).

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 3.6K

    Monthly active users

  • 1.5K

    Posts

  • 35K

    Comments