             resolver.declare(name)
             resolver.define(name)
             
-            let resolvedBody = resolver.resolveFunction(name: name, parameters: parameters, body: body, type: .function)
-            
-            return .function(name: name, parameters: parameters, body: resolvedBody)
+            return resolver.resolveFunction(name: name, parameters: parameters, body: body, type: .function)
         
         case .expr(let expr):
             return .expr(expr: expr.resolve(resolver: resolver))

        
        currentFunction = enclosingFunction
        
        return resolvedBody
    }
}


        return scopes.count // global
    }
    
    func resolveFunction(name: Token, parameters: [Token], body: [Stmt], type functionType: FunctionType) -> ResolvedStmt {
        let enclosingFunction = currentFunction
        currentFunction = functionType
        
