Summing the first 1000 integers
Here is an example of developing a program
to solve a very simple problem:
``Compute the sum of the first 1000 integers''
Our overall approach for solving it:
- think about the problem in abstract terms
- formulate a ``method'' in these terms
- give more and more details of the method
- eventually reach a description in C
Note Haskell solution:
sum [1..1000]
Index