static function args(array $args, $required, array $optional = NULL)
  {
    if (count($args) < $required)
    {
      throw new Error("Function requires at least $required arguments.");
    }

    return array_merge($args, (array) $optional);
  }