# All Science Fair Projects

## Science Fair Project Encyclopedia for Schools!

 Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary

# Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

# Concatenative programming language

In concatenative programming languages, the concatenation of appropriate programs denotes the composition of the functions which the programs denote. Operations map an input stack into a results stack, and so it is possible to repeatedly concatenate a sequence of operations to create a program.

A programming language is concatenative (and not applicative) when:

• The elementary well-formed expressions of the language are monadic functions of one argument and one return value.
• If X and Y are well-formed expressions, then the concatenation of X and Y is well-formed.
• If Z is the concatenation of X and Y, then the value of Z is the composition of the values of X and Y.

In this definition, there is no mention of the stack, and it is theoretically possible to have a concatenative language without a stack, but in practice, no such language exists. This precise definition of concatenative languages is very contravercial, and the actual meaning of "concatenative" is frequently debated.

Arguably, Forth was the first concatenative language, but Joy was the first language to call itself concatenative. The creator of Joy, Manfred von Thun , has written much about concatenative theory. The category Concatenative programming languages contains an exhaustive list of those known to Wikipedia.

## Examples

In Joy, the program fragment:

2 7 +

Pushes "2" then "7" onto the stack. The "+" operator then replaces the stack with a new stack that contains the resulting sum "9", this notation is also known as "Reverse Polish notation".