src/Lazy/Enumerable.php
public function transpose()
    {
        return new Enumerator(
            function () {
                $ret = [];
                foreach ($this->each() as $row) {
                    foreach ($row as $k => $col) {
                        $ret[$k][] = $col;
                    }
                }

                foreach ($ret as $k => $r) {
                    yield $k => $r;
                }
            }
        );
    }
public function transpose()
    {
        return new Enumerator(
            function () {
                $ret = [];
                foreach ($this->each() as $row) {
                    foreach ($row as $k => $col) {
                        $ret[$k][] = $col;
                    }
                }

                foreach ($ret as $k => $r) {
                    yield $k => $r;
                }
            }
        );
    }
public function transpose ( ) { return new Enumerator ( function ( ) { $ ret = [ ] ; foreach ( $ this -> each ( ) as $ row ) { foreach ( $ row as $ k => $ col ) { $ ret [ $ k ] [ ] = $ col ; } } foreach ( $ ret as $ k => $ r ) { yield $ k => $ r ; } } ) ; }
Return Enumerator which returns transposed Array

@return \dooaki\Container\Lazy\Enumerator|\Generator
Return Enumerator which returns transposed Array