From: Sebastian Hungerecker Date: 2009-09-04T19:36:08+09:00 Subject: Re: Array.transpose on [[]] or [[],[]] Am Freitag 04 September 2009 11:25:04 schrieb Ralf Mueller: > sure, but [[]] has a subarray. so, shouldn't [[]].transpose have one too? Well, [[1],[2]] has two subarrays so should [[1],[2]].transpose have two subarrays too? As I said, the number of subarrays in the result equals the number of items per subarray in the source. I find this completely consistent. > To point it out in a more general way: I thought, if 'transpose' can be > applied to an array, it should behave like an involution: > a.transpose.transpose = a. If both [[]].transpose and [[],[]].transpose would return [[]], that still wouldn't be true (because then [[],[]].transpose.transpose would be [[]]). The only way to ensure that [[],[]].transpose.transpose == [[],[]], would be to make transpose on an array of empty arrays to return self, which would be totally inconsistent with how transpose usually works.