public function partitions(callable $callable) : array
    {
        /** @var self[] $return */
        $return = [];

        foreach ($this->elements as $key => $element) {
            $value = $callable($element, $key);

            if (!isset($return[$value])) {
                $return[$value] = clone $this;
                $return[$value]->elements = [];
            }

            $return[$value]->add($element);
        }

        return $return;
    }