Transposing output in comparison functions