News for hackers. Stuff that matters.
Re:How it became like this? Ruby Range class by pooriar on Monday July 29, 2024 @10:59PM (#41105709)
Same as this?

  (1..20).each do |i|
    puts i if i.odd? || i.prime?
  end
edit - upon testing, I just realized the parent's code prints 10 & 16, my code does not, so not the same.
Re:How it became like this? Ruby Range class by codesnik on Tuesday July 30, 2024 @12:44PM (#41111184)
flipflop basically has a hidden boolean variable for state. Btw, while I HAD used it, i still have no idea what's the scope of that state and when it'd reset itself.