Appendix to Assignment 2

Motivation for string processing

Traditionally, Lisp's main style of use was in processing lists of data objects such as symbols. Nowadays, however, strings and files are very important, because programs must often work together with other programs written in different languages, and so data must often be manipulated in a form that can be handled by the other programs. Strings are a de-facto common data structure.

LaTeX Examples

  • The LaTeX source for the law of Pythagoras is
    $$c = \sqrt{a^2 + b^2}$$
    
  • The fraction bar example:
    $$r = \frac{c}{2 \pi}$$
    
  • Here's the quadratic formula.
    $$\frac{{-B\pm\sqrt{B^2-4AC}}}{2A}$$
    
  • Formatted results.

    An additional test example

    Here's another Lisp expression that you may want to use to test your LISP-TO-LATEX function. This one represents De Moivre's Theorem.
    (= (expt (* r (+ (cos t)(* i (sin t)))) n)
       (* (expt r n)
          (+ (cos (* n t))(* i (sin (* n t))))
    ) )