ast = $ast; $this->tempEnv = $tempEnv; $this->bindings = $bindings; } public function getAst() { return $this->ast; } public function getEnv(array $args) { $newEnv = new Env('apply', $this->tempEnv); for ($i = 0; $i < count($this->bindings); $i++) { $newEnv->set($this->bindings[$i]->getName(), $args[$i] ?? null); } return $newEnv; } public function call(array $args) { return ($this->closure)(...$args); } }