News for hackers. Stuff that matters.
Re:Async-await on stable Rust by wwright on Thursday November 07, 2019 @08:54PM (#21479387)
Does Rayon use iterators, or just iterator-like combinators? I don’t think a for-loop would work with Rayon, would it?

You can also definitely implement iterators using first-order functions:

    const iterate = array => {
      const step = index => ({
        value: array[index],
        next: () => step(index + 1)
      });
      return step(0);
    }

    // add some combinators on top
First order functions can in fact implement anything if you’re willing to accept some bad syntax and speed — that’s the Church-Turing equivalence.
Re:Async-await on stable Rust by fnord123 on Friday November 08, 2019 @07:49AM (#21481738)
Hm. You're right. I hadn't used Rayon in so long I forgot it is indeed iterator-like combinators using an entry point called `par_iter`.