What is the programming structure for LISP?
Answer / chaitanya
LISP programming structure is composed of symbolic expressions or s-expressions. The s-expression consists of three valid objects
• Atom: It is a number or string of contiguous characters
• Lists : A list is a sequence of atoms or other lists enclosed in parentheses
• String: A group of characters enclosed in double quotation marks is referred as String.
LISP programs can be either run on an interpreter or as a compiled code
Is This Answer Correct ? | 0 Yes | 0 No |
Explain what is the difference between bagof/3 and setof/3 predicate in Prolog?
Mention what are the two pre-defined packages used in LISP?
Which is a string of boxes linked by arrow like pointers in LISP? a) Lisp b) List c) Variables d) Pointers
Explain what is List structures in Prolog?
Which do not evaluate their arguments in LISP? a) List b) Procedure c) Setf d) Macros
What is the output of the following statement? * ‘(first (first (rest (rest ((a b) (c d) (e f)))))) a) a b) b c) ab d) (FIRST (FIRST (REST (REST ((A B) (C D) (E F))))))
Explain with an example what is “Setof” predicate in Prolog?
What is the output of the following statement? * (setf breakfast ‘(eggs bacon toast tea)) * (cond ((> (length breakfast) 10) ‘glutton) ((not (endp breakfast)) ‘normal)(t ‘anorexic)) a) Anorexic b) Breakfast c) Eggs d) Normal
Which primitive removes all but the last element from the list? a) Last b) First c) Remove d) Revoke
How the clause is called if it contains a test, as well as zero or more additional forms in LISP? a) Conditional b) Consequents c) Clause d) None of the mentioned
Explain what is LISP constants?
Which keyword is used to define the method? a) Defun b) Destruct c) Demake d) Defmethod