Input: dropRightWhile([1, 2, 3, 4], value => value > 2) Output: [1, 2]
Remove a consecutive run of matching values from the end of an array, stopping at the first predicate failure.