public function walk($callable, bool $recursive = false): self
    {
        $this->generatorToArray();

        if ($recursive === true) {
            \array_walk_recursive($this->array, $callable);
        } else {
            \array_walk($this->array, $callable);
        }

        return $this;
    }
public function walk($callable, bool $recursive = false): self
    {
        $this->generatorToArray();

        if ($recursive === true) {
            \array_walk_recursive($this->array, $callable);
        } else {
            \array_walk($this->array, $callable);
        }

        return $this;
    }
public function walk ( $ callable , bool $ recursive = false ) : self { $ this -> generatorToArray ( ) ; if ( $ recursive === true ) { \ array_walk_recursive ( $ this -> array , $ callable ) ; } else { \ array_walk ( $ this -> array , $ callable ) ; } return $ this ; }
Apply the given function to every element in the array, discarding the results.

@param callable $callable
@param bool     $recursive <p>Whether array will be walked recursively or no</p>

@return static
<p>(Mutable) Return this Arrayy object, with modified elements.</p>
Apply the given function to every element in the array discarding the results .