Util.list_foldi
functorial implementation of Precedence, more generic and simpler
updated Ordering to use the new Precedence interface