[amp_mcq option1=”(lambda (x) (+(*2 x)l))” option2=”(lambda (x) (+1 (* 2x)” option3=”(+ lambda (x) 1 (*2x))” option4=”(* lambda(x) (+2Ã1)” correct=”option1″]
The correct answer is A.
In LISP, a function is defined using the lambda function. The lambda function takes two arguments: the name of the function and the body of the function. The body of the function is a list of expressions, which are evaluated in order.
In the expression (lambda (x) (+(*2 x)l)), the lambda function defines a function called x. The body of the function is the expression (+(*2 x)l), which evaluates to 2x+l.
The other options are incorrect because they do not define a function called x. Option B defines a function called (lambda (x) (+1 (* 2x)), which evaluates to 1+2x. Option C defines a function called (+ lambda (x) 1 (*2x)), which evaluates to 1+2x. Option D defines a function called (* lambda(x) (+2Ã1)), which evaluates to 2*1.