If you specifically want some Ada sort code, look at Booch's "Software
Development in Ada" book.