Book

The Structure and Interpretation of Computer Programs

Programming Book

Chapter 1 Predicates/Expressions Functions v. Procedures or Imperative v. Declarative Chapter 1 # Predicates/Expressions # Taking the following Lisp code: (defun abs (x) (cond ((> x 0) x) ((= x 0) 0) ((< x 0) (- x)))) which simply calculates the absolute value of a number, we see within the cond (conditional) three “clauses”. These parenthesized pairs (clauses) are formed of “predicates” and “expressions”, respectively. ...