is_sorted and is_sorted_until algorithms

Just `return end;` please.