Concepts of Programming Languages

(Sean Pound) #1

722 Chapter 15 Functional Programming Languages



  1. Why are CAR and CDR so named?

  2. If CONS is called with two atoms, say 'A and 'B, what is the returned?

  3. Describe the syntax and semantics of LET in Scheme.

  4. What are the differences between CONS, LIST, and APPEND?

  5. Describe the syntax and semantics of mapcar in Scheme.

  6. What is tail recursion? Why is it important to define functions that use
    recursion to specify repetition to be tail recursive?

  7. Why were imperative features added to most dialects of LISP?

  8. In what ways are Common LISP and Scheme opposites?

  9. What scoping rule is used in Scheme? In Common LISP? In ML? In
    Haskell? In F#?

  10. What happens during the reader phase of a Common LISP language
    processor?

  11. What are two ways that ML is fundamentally different from Scheme?

  12. What is stored in an ML evaluation environment?

  13. What is the difference between an ML val statement and an assignment
    statement in C?

  14. What is type inferencing, as used in ML?

  15. What is the use of the fn reserved word in ML?

  16. Can ML functions that deal with scalar numerics be generic?

  17. What is a curried function?

  18. What does partial evaluation mean?

  19. Describe the actions of the ML filter function.

  20. What operator does ML use for Scheme’s CAR?

  21. What operator does ML use for functional composition?

  22. What are the three characteristics of Haskell that make it different
    from ML?

  23. What does lazy evaluation mean?

  24. What is a strict programming language?

  25. What programming paradigms are supported by F#?

  26. With what other programming languages can F# interoperate?

  27. What does F#’s let do?

  28. How is the scope of a F# let construct terminated?

  29. What is the underlying difference between a sequence and a list in F#?

  30. What is the difference between the let of ML and that of F#, in terms of
    extent?

  31. What is the syntax of a lambda expression in F#?

  32. Does F# coerce numeric values in expressions? Argue in support of the
    design choice.

Free download pdf