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

            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)
        
        case .expr(let expr):
            return .expr(expr: expr.resolve(resolver: resolver))

        
        currentFunction = enclosingFunction
        
        return .function(name: name, parameters: parameters, body: resolvedBody)
    }
}

