Go to the first, previous, next, last section, table of contents.

The MUF Stack

Think of MUF as a very quick and eager assistant which is very eager to please, but just extraordinarily stupid.

If you were to give a series of objects to such an assistant one at a time, what do you suppose it would do with them?

What a human helper of this type might do is difficult to say, but what MUF will do in this situation is perfectly predictable:

It will make a neat little pile of them, one atop the other, and keep adding each new item to the top until you tell it otherwise.

This little pile behaves much like those spring-loaded stacks of plates at cafeterias: It is much easier to put something on the top, or to remove the top item, than it is to get at things lower down. So we traditionally call this little pile "the stack".

Note: While MUF is a simple-minded little helper, it is not entirely without subtlety: It has a second stack of its own that you rarely get to see. When we get to discussing this, we'll distinguish between the "data stack", described above, and this hidden "loop stack". For now, however, the data stack is the only one we're concerned with, so we'll follow the usual custom of simply referring to it as "The Stack".

When you are playing with MUF, it is very helpful to see the contents of the stack, so after it finishes each command, MUF prints out a line consisting of a word like "stack:" followed by the contents of the stack. If there are too many things on the stack to show them all (there might be thousands) it shows just the top few.

Here is an example of what you will see if you feed the words "This is a test" to MUF one at a time. We'll give lots of examples like this in this tutorial: I strongly encourage you to actually try them out! Remember to put each word in double quotes for this example:

Stack: "This"
Stack: "This" "is"
Stack: "This" "is" "a"
Stack: "This" "is" "a" "test"

Go to the first, previous, next, last section, table of contents.