public function unique(callable $func = null)
    {
        return new Enumerator(
            function () use ($func) {
                $exists = [];
                foreach ($this->each() as $k => $v) {
                    $comp = $func ? $func($v) : $v;
                    if (!in_array($comp, $exists, true)) {
                        $exists[] = $comp;
                        yield $k => $v;
                    }
                }
            }
        );
    }