CS 5010: Guided Practice 4.1

Consider the following data definition:

    ;; A StringList is one of
    ;; -- empty
    ;; -- (cons String StringList)
  

Which of the following expressions has a value that is a StringList ?

  1. (cons "abc" empty)
  2. (cons "bcd")
  3. (cons "cde" (cons "ef" empty))
  4. (cons "3" (cons "4" empty))
  5. (cons 3 (cons 4 empty))

[ANSWER]