finished implementation of Wadler/Hughes algebra