Java logo

Scheme Information

Fall 1998



Here is some additional information on Scheme
---------------------------------------------

Logical predicates:  and, or, not

Predicates for numbers:  = , <>, <, <=, >, >=
                         integer?, float?, zero?, even?

Equality:  eq? [same object pointers]
           equal?  [look the same when printed]

Dotted pairs: Actual form rather than lists!
              Example: (cons 3 4) -> (3 . 4)
                       (car (3 . 4)) -> 3
                       (cdr (3 . 4)) -> 4
        (list exp1 exp2 ... expn) =
                (cons exp1 (cons exp2 ... (cons expn nil) ... ))
        Thus, lists are like dotted pairs with nil as last cdr.

        Predicates: pair?, atom? [not a pair]

Also, string?, string=? and many character predicates
such as char?, char=?, char