I don't know what pairwise does in python, but it sounds similar to pairs in List::Util. See also List::MoreUtils for pairwise and many other functions. On the other hand, I don't see how these functions can help you in getting the monotonic sequences.