/**
 * An attempt to encapuslate the key ideas in Scheme lists within
 * this hideous <profanity> <profanity> nanny-like language.
 *
 * @author Saul St. John
 * @author Other folks who also did the wrong reading
 */
public abstract class SchemeList
{
  /**
   * Get the first element of this list.
   */
  public abstract Object car();

  /**
   * Get all but the first element of this list.
   */
  public abstract SchemeList cdr();

  /**
   * Create a new list.  YOU MUST OVERRIDE THIS METHOD IN A SUBCLASS
   */
  public static SchemeList cons(Object head, SchemeList tail) {
    return null;
  } // cons(Object, SchemeList)

  /**
   * Make an empty list.
   */
  public static SchemeList empty() {
    return null;
  } // empty()

  /**
   * Check if a list is empty.
   */
  public static boolean isEmpty(SchemeList lst) {
    return lst == null;
  } // isEmpty(SchemeList)
} // SchemeList

