This is an implementation of TBaseListSort
List item: TCost
Adds function Max, which returns the largest item.