Mention what are the three functions required by LISP?
Answer / chaitanya
For defining functions, macro named defun is used, it needs three arguments
• Name of the function
• Parameters of the function
• Body of the function
Is This Answer Correct ? | 2 Yes | 0 No |
Mention what are the three functions required by LISP?
Explain what is the difference between bagof/3 and setof/3 predicate in Prolog?
How many items are available in mapping primitives are there? a) 3 b) 4 c) 5 d) 6
What is the output of the given statement? * (defstruct triangle (base 0) (altitude 0)) * (defun area (figure) (cond ((triangle-p figure) (* 1/2 (triangle-base figure) (triangle-altitude figure))))) * (setf triangle (make-triangle :base 2 :altitude 3)) * (area triangle) a) Triangle b) 7 c) 6 d) 10
Mention what is Cut (!) in Prolog and what is the advantage of ‘Cut’ and ‘Negation’?
What is the output of the given statement in LISP? * (setf bins (make-array 2 :initial-element ‘e)) a) E b) E E c) E E E d) E E E E
In “cuts” what is the Parent goal in Prolog?
What is the output of the given statement in LISP? * (setf fact1 ‘(big computers are nice)) * (setf (first fact1) ‘fast) a) Big computers b) Fast c) Big computers are fast d) None of the mentioned
Which can build new lists by depositing pointers in free boxes? a) Do b) Dobuild c) Cons d) None of the mentioned
Which class can help to select a method? a) Nonoptional argument b) Class c) Method d) None of the method
Which notation facilitates uniformity in lisp? a) Prefix b) Postfix c) Infix d) None of the mentioned
What is the output of the given statement? * (defstruct person (sex nil) (personality ‘nice)) * (setf person-instance-1 (make-person)) * (setf person-instance-2 (make-person :sex ‘female)) * (setf (person-surname person-instance-1) ‘winston) a) Winston b) Nil c) T d) Error