public function walk(callable $func, $recursively = false)
    {
        if (true === $recursively) {
            array_walk_recursive($this->elements, $func);
        } else {
            array_walk($this->elements, $func);
        }

        return $this;
    }
public function walk(callable $func, $recursively = false)
    {
        if (true === $recursively) {
            array_walk_recursive($this->elements, $func);
        } else {
            array_walk($this->elements, $func);
        }

        return $this;
    }
public function walk ( callable $ func , $ recursively = false ) { if ( true === $ recursively ) { array_walk_recursive ( $ this -> elements , $ func ) ; } else { array_walk ( $ this -> elements , $ func ) ; } return $ this ; }
Apply the given function to the every element of the current array,
discarding the results.

@param callable $func
@param bool $recursively Whether array will be walked recursively or no

@return ArrayImitator The current array with modified elements
Apply the given function to the every element of the current array discarding the results .