src/Map.php
public function apply(callable $callback)
    {
        foreach ($this->pairs as &$pair) {
            $pair->value = $callback($pair->key, $pair->value);
        }
    }
public function apply(callable $callback)
    {
        foreach ($this->pairs as &$pair) {
            $pair->value = $callback($pair->key, $pair->value);
        }
    }
public function apply ( callable $ callback ) { foreach ( $ this -> pairs as & $ pair ) { $ pair -> value = $ callback ( $ pair -> key , $ pair -> value ) ; } }
Updates all values by applying a callback function to each value.

@param callable $callback Accepts two arguments: key and value, should
return what the updated value will be.
Updates all values by applying a callback function to each value .