Notes on the History of Scheme: Lisp was invented in the late 1950's and early 1960's at M.I.T. by John McCarthy. Lisp is based in part on the Lambda Calculus, a mathematical formalism developed by Alonzo Church (1903-1995).
Lisp is the second-oldest language still in widespread use (the oldest is Fortran). Two dialects of Lisp are widely used today: Scheme and Common Lisp. Scheme is a small, uniform dialect that is good for teaching because of its simplicity. Common Lisp is a large, ``industrial-strength'' dialect that is standardized and is available in several commercial versions. In this course, we will use an implementation of Scheme called Chez Scheme .
Most programming languages require learning the syntax of many different kinds of statements. In contrast, Scheme (and Lisp) syntax is simple and uniform. Much of the work in learning Scheme is learning the names and effects of the system functions that form the core of the language. This course presents the system functions and covers other functions that are present in Common Lisp.
Lisp is especially used for work in Artificial Intelligence.
Steps for this Lab:
schemein the hpterm window.
Numbers are expressions, whose value or meaning is the number
Type several numbers into Chez Scheme, typing one number at a time. For example, at the Scheme prompt, type
7 -10 3.1415926535In each case, note how Chez Scheme responds.
3/5 -18/19 10/34How many digits are printed in the answer for rational numbers?
(define pi 3.141592)Now enter pi into Scheme and determine what happens.
Check if work with symbols within Chez Scheme is case sensitive. What happens if you type Pi or PI.
Check whether Scheme allows you to redefine the value of a symbol. For example, following the 1897 Indiana House, try to declare that the value of pi is three:
(define pi 3)Now what happens if you type the symbol pi?
Determine what happens if you make a typographical error. For example, try misspelling define or leaving out a left or right parentheses. In each case, make a note describing what happens.
(- 27 3) (/ 17 2) (/ 17 -2) (/ 17 2.0) (truncate (/ 17 4)) (modulo 17 3) (sqrt 4) (sin 0.5) (sqrt -2) (+ (* 3 2) (/ 8 4))
(quote pi)(quote pi) may be abbreviated 'pi . Try typing this at the keyboard as well.
This document is available on the World Wide Web as