src/Heterogeny/Seq.php
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;
    }
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;
    }
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 ; }
Filter an Seq using a predicate which receives key and value return a new `Seq` with elements
that doesn't match the predicate

@param callable $function
@return Seq
Filter an Seq using a predicate which receives key and value return a new Seq with elements that doesn t match the predicate