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]

Tags:

Updated: