public function each(callable $callable)
    {
        foreach ($this->value as $key => &$val) {
            try {
                $callable($val, $key);
            } catch (BreakException $e) {
                // catching a BreakException means that $callable
                // requested to end the loop
                break;
            }
        }

        return $this;
    }
public function each(callable $callable)
    {
        foreach ($this->value as $key => &$val) {
            try {
                $callable($val, $key);
            } catch (BreakException $e) {
                // catching a BreakException means that $callable
                // requested to end the loop
                break;
            }
        }

        return $this;
    }
public function each ( callable $ callable ) { foreach ( $ this -> value as $ key => & $ val ) { try { $ callable ( $ val , $ key ) ; } catch ( BreakException $ e ) { // catching a BreakException means that $callable // requested to end the loop break ; } } return $ this ; }
Iterates collection. Value is passed by reference in the callback.

Callback has the following form:

`mixed callback (mixed $value, mixed key)`

With:
- value: the value of the current iteration
- key: the key of the current iteration

@param callable $callable

@return $this
Iterates collection . Value is passed by reference in the callback .