linear argument

linear argument

(theory)A function argument which is used exactly once by thefunction.

If the argument is used at most once then it is safe toinline the function and replace the single occurrence of theformal parameter with the actual argument expression. If theargument was used more than once this transformation wouldduplicate the argument expression, causing it to be evaluatedmore than once.

If the argument is sure to be used at least once then it issafe to evaluate it in advance (see strictness analysis)whereas if the argument was not used then this would wastework and might prevent the program from terminating.