News for hackers. Stuff that matters.
Re:Push ifs up and fors down by jaza on Friday November 17, 2023 @05:48AM (#38301807)
That's the nicest counter-example to my example, thanks for that! I wasn't familiar with take_while() (looks like that's Rust, and looks like Python has a similar itertools.takewhile() ), TIL a neat FP version of break. My example was quite trivial, it's not always so obvious how to break up a convoluted loop, but it should always be possible.

There are no comments on this comment yet.