News for hackers. Stuff that matters.
Re:Nim 2.0 thoughts by planetis on Sunday May 16, 2021 @04:50AM (#27172260)
That's an obscure/not optimal way to write this code though. I mean why would you use LIST comprehension if you are going to yield each element.
Re:Nim 2.0 thoughts by nerdponx on Sunday May 16, 2021 @07:56AM (#27173050)
It's not list comprehension, it's generator comprehension, which is lazily computed. However it's still an unnecessary layer of iteration, when you could just return the comprehension instead.