public function filterWithIndex(callable $function): Seq
    {
        $result = new Seq();

        foreach ($this->data as $key => $value) {
            if (!!$function($key, $value)) {
                $result = $result->append($value);
            }
        }

        return $result;
    }