?- list2rows([1,2,3,4,5,6],2,3,Rows), transpose(Rows,Cols). Rows = [[1, 2, 3], [4, 5, 6]] Cols = [[1, 4], [2, 5], [3, 6]] Yes (0.00s cpu)