adplus-dvertising
frame-decoration

Question

What is the output of the given statement?
span class="sy0"> * (defun add-binding (pattern-variable-expression datum bindings) 
  (if (eq '_ (extract-variable pattern-variable-expression)) bindings (cons 
  (make-binding (extract-variable pattern-variable-expression) datum) bindings)))
* (add-binding '(? _) 'apple '((y red)))

a.

X

b.

Y

c.

(X apple)

d.

(Y red)

Answer: (d).(Y red)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the given statement?

Similar Questions

Discover Related MCQs

Q. Which is used to compare patterns and datums element by element?

Q. Which keeps variable binding on an association list?

Q. What is the name of elements present in patterns?

Q. What is the way of expressing an ordinary expression in terms of bits?

Q. Which procedure is used as key element in a backward chaining algorithm?

Q. Which constraint has the parameter that identifies where the constraint is coming from?

Q. Which functions are used to enforce constraints?

Q. Which propagate probability bounds through logic boxes?

Q. What is the process of combining assertions and logical constraints?

Q. Which is used to represent assertions and logical constraints?

Q. Which have the ability to propagate numbers through arithmetic boxes?

Q. Which can build new lists by depositing pointers in free boxes?

Q. Which can be represented in bytes?

Q. Which is used to construct new lists by linking the right pointers?

Q. What is the other name of boxes?

Q. Which is a string of boxes linked by arrow like pointers?

Q. Which makes nameless procedures into lexical closures?

Q. Which do not produce nested fences?

Q. Which helps to produce nested fences?

Q. Which primitive enables you to define one procedure inside another?