binary sort for E (still TL)