2-3 tree implementation in ML