public function map(callable $applyToValue, $generatorName) { return new self($applyToValue($this->value), $this, $generatorName); }
private function mapToAssociativeArray(GeneratedValue $tuple) { return $tuple->map(function ($value) { $associativeArray = []; $keys = array_keys($this->generators); for ($i = 0; $i < count($value); $i++) { $key = $keys[$i]; $associativeArray[$key] = $value[$i]; } return $associativeArray; }, 'associative'); }