Spring 2001, CSE 428: Quiz 10.1 - 11 April 2001


Please write your Name and Student ID at the top of the page. By default, this quiz will be returned in Section 2 (morning section).
  1. [Pts 2]   Consider the following datatype declaration:
       datatype 'a tree = empty | node of 'a tree * 'a * 'a tree;
    
    In this declaration, 'a is (only one answer please):

  2. [Pts 2]   For each of the following functions on the above datatype, say whether it is polymorphic (in the sense that it accepts in input trees with labels of any type) or not

  3. [Pts 2]   In general, the entities defined by a logic program are (only one answer, please)

  4. [Pts 4]   Consider the usual definition of the append predicate:
       append([],L,L).
       append([X|L],K,[X|M]) :- append(L,K,M).
    
    For each of the following queries, please indicate all the answers that are returned (assuming that we interactively keep asking for more answers). If no answers are returned, write "no". If the query generates an error, write "error".