Excercise 2: Implemented the polymorphic function isSorted.

As stated in the book, the universe of possible implementations is significantly
reduced when implementing such a polymorphic function.