src/Lazy/Enumerable.php
private function _groupBy(&$result, $k, $v, $func)
    {
        if ($v instanceof self) {
            foreach ($v->each() as $kk => $vv) {
                $this->_groupBy($result, $kk, $vv, $func);
            }
        } else {
            $aggregate_key = call_user_func($func, $v, $k);
            $result[$aggregate_key][] = $v;
        }
    }
private function _groupBy(&$result, $k, $v, $func)
    {
        if ($v instanceof self) {
            foreach ($v->each() as $kk => $vv) {
                $this->_groupBy($result, $kk, $vv, $func);
            }
        } else {
            $aggregate_key = call_user_func($func, $v, $k);
            $result[$aggregate_key][] = $v;
        }
    }
private function _groupBy ( & $ result , $ k , $ v , $ func ) { if ( $ v instanceof self ) { foreach ( $ v -> each ( ) as $ kk => $ vv ) { $ this -> _groupBy ( $ result , $ kk , $ vv , $ func ) ; } } else { $ aggregate_key = call_user_func ( $ func , $ v , $ k ) ; $ result [ $ aggregate_key ] [ ] = $ v ; } }
call by groupBy method

@see groupBy
@param array    &$result
@param mixed    $k
@param mixed    $v
@param callable $func
@return void
call by groupBy method