protected function apply($function, $args = array())
  {
    foreach ($this->data as $key => &$value) {

      if (!is_array($value)) {
        $value = $this->applyToValue($function, $args, $value);
      } else {
        $value = array_map(function ($v) use ($function, $args) {
          return $this->applyToValue($function, $args, $v);
        }, $value);
      }

    }
  }