@[email protected] to Programmer [email protected] • 1 year agowhy not a,b or x,y?lemm.eeimagemessage-square87fedilinkarrow-up1653arrow-down143
arrow-up1610arrow-down1imagewhy not a,b or x,y?lemm.ee@[email protected] to Programmer [email protected] • 1 year agomessage-square87fedilink
minus-square@[email protected]linkfedilink28•1 year agox 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.
minus-square@[email protected]linkfedilink11•1 year agoI’ve gotten used to using the singular form as in… records.filter((record) => …) Not saying this way is better but it works for me.
minus-squarerusslinkfedilink1•1 year agoYes! I love using x (and xs) for functions over whatever the thing is (or things are).
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.
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.
Yes! I love using x (and xs) for functions over whatever the thing is (or things are).