Added Prolog version of tab-transpose