Short-circuiting:
1..arr.end -> all{ arr[0] == arr[_] } # all equal 1..arr.end -> all{ arr[_-1] < arr[_] } # strictly ascending
Non short-circuiting:
arr.uniq.len == 1 # all equal arr == arr.uniq.sort # strictly ascending
Last updated 1 year ago