News for hackers. Stuff that matters.
Re:Clever code is probably the worst code you could write by psychoslave on Wednesday May 22, 2024 @11:42AM (#40442339)
With ruby 3.4 (prior to that `_1` should be used instead of `it`):

    (0..10).select{it.even?}
Re:Clever code is probably the worst code you could write by psychoslave on Wednesday May 22, 2024 @11:47AM (#40442400)
Also not that the result is `[0, 2, 4, 6, 8, 10]`, unlike the behavior of Python which exclude the value explicitely passed in parameter from the represented range.