Back to Fpinscala

02.Hint

answerkey/gettingstarted/02.hint.md

latest172 B
Original Source

You know the array is not sorted as soon as you encounter two adjacent elements for which gt(first, second) returns true (note that equal adjacent elements are in order).