Jonathan Olsson
09/19/2023, 8:35 AMshouldBeMonotonicallyDecreasing
seems to do the work:
Didn't find it in documentation though, or perhaps I am blind? 😛Copy codelistOf(10, 9, 8, 8, 6).shouldBeMonotonicallyDecreasing()
LeoColman
09/19/2023, 12:26 PMJonathan Olsson
09/19/2023, 12:27 PMLeoColman
09/19/2023, 12:27 PMlist.shouldBeSortedBy { transform }
I'd use this guylist.reverse().shouldBeSorted()
list.shouldBeSortedDesc()
if you want to open a ticket for thatJonathan Olsson
09/19/2023, 12:33 PMKlitos Kyriacou
09/19/2023, 12:51 PMlist.asReversed()
which iterates in reverse order without actually creating a reversed list.