Identify increasing and decreasing sequences (#32)