However, it details one of the major differences between . The formal parameters of a function are those occurring in the argument list of the function. Their values are determined by the process of binding the actual function arguments to the formal parameters. Local variables are those whose values are determined by the evaluation of expressions in the body of the functions. Variables which are not formal parameters or local variables are called free variables.
Free variables become local variables if they are assigned to.
Consider the following function definition. In . the free variable bindings are resolved by first looking in the environment in which the function was created. First we define a function called cube . The variable n in the function sq is not an argument to that function. Therefore it is a free variable and the scoping rules must be used to ascertain the value that is to be associated with it.