src/Primitive/Container/Container.php
public function walk(callable $callback, $recursive = false, $userdata = null)
    {
        $function = $this->getBoolable($recursive) ? 'array_walk_recursive' : 'array_walk';

        $function($this->items, $callback, $userdata);

        return $this;
    }
public function walk(callable $callback, $recursive = false, $userdata = null)
    {
        $function = $this->getBoolable($recursive) ? 'array_walk_recursive' : 'array_walk';

        $function($this->items, $callback, $userdata);

        return $this;
    }
Apply a user function to every Container item.
You can specify recursive walk with the second argument.

@param callable $callback
@param bool|BooleanContract $recursive
@param null|mixed $userdata
@return $this