public static function groupBy($list, $iterator, $context = null)
    {
        static::associate($iterator, $context);

        $result = [];
        static::each($list, function ($item) use ($iterator, & $result) {
            static::isScalar($iterator)
                ? $result[static::get($item, $iterator)][] = $item
                : $result[$iterator($item)][] = $item;
        });

        return $result;
    }