On Monday, 13 January 2025 at 21:48:15 UTC, monkyyy wrote:
Is there a clean idea someone has?
There's no state kept after each reduction step; each comparison is done independently of the previous ones. So this really is just a negated 'find' operation, for which you can use `all`:
```D bool issorted(R)(R r) => r.slide(2).all!(a => a[0] < a[1]); ```