Noriyo Akita's Today I Learned

# 2024-06-11

Table of Contents

2024-06-11

Date::DAYNAMES

https://x.com/coolprobn/status/1799054952859660605

> require 'date'
=> false
> Date::DAYNAMES
=> ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]

https://x.com/andycroll/status/1797535812621652147

https://x.com/andycroll/status/1797535812621652147

> def only_evens(numbers) = numbers.select(&:even?).sort
=> :only_evens
> only_evens([1, 2, 3, 4])
=> [2, 4]
> def only_evens(numbers) = numbers.filter { _1.even? }.sort
=> :only_evens
> only_evens([1, 2, 3, 4])
=> [2, 4]
My avatar

Thanks for reading my blog post! Feel free to check out my other posts or contact me via the social links in the footer.


More Posts