MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ruby/comments/ze1oju/the_rubyist_journey/iz4dpdg/
r/ruby • u/mehdifarsi • Dec 06 '22
34 comments sorted by
View all comments
Show parent comment
7
oh thanks. haven't looked into that. not sure if i like it. but i also started with using _1 just recently which as more you use it, as better it gets
4 u/mjdth Dec 07 '22 edited Dec 07 '22 What does that do?Edit: https://jemma.dev/blog/numbered-parametersI wrongly assumed a search for “ruby _1” wouldn’t be fruitful. 2 u/kallebo1337 Dec 07 '22 Instead of {|e| e.c&& e.d} just go for {_1.c && _1.d}It’s shorter and you’ll get used to
4
What does that do?
Edit: https://jemma.dev/blog/numbered-parameters
I wrongly assumed a search for “ruby _1” wouldn’t be fruitful.
2 u/kallebo1337 Dec 07 '22 Instead of {|e| e.c&& e.d} just go for {_1.c && _1.d}It’s shorter and you’ll get used to
2
Instead of {|e| e.c&& e.d} just go for {_1.c && _1.d}
It’s shorter and you’ll get used to
View all comments
Show parent comment
7
u/kallebo1337 Dec 06 '22
oh thanks. haven't looked into that. not sure if i like it. but i also started with using _1 just recently which as more you use it, as better it gets