Writing Programs

So far we've learnt about how to write procedures for solving small problems, such as finding the average of two numbers.

What's the difference between a procedure and a program? One difference is that a procedure is like programming a calculator - it performs a single operation of fixed size, such as finding the average of two numbers. A program usually solves a problem of arbitrary size, depending on the data you give it.

In Lisp the best approach to writing a program is to break it down into small procedures, each of which performs one task needed by the program. This makes it easier to test each component of your program, in isolation.

In this second part of the tutorials we are going to show the techniques for performing operations on arbitrary amounts of data, as a step towards writing full-sized computer programs.

blog comments powered by Disqus