Joy (programming language)
Joy is a functional programming language in which consistently the reverse Polish notation.
Joy was by Manfred von Thun, works at La Trobe University in Melbourne (Australia ) developed. The core idea is the composition of functions, with a number of combinators is available. In simple cases looks JOY code as FORTH, the significance is, however, far more powerful because data structures ( and equally program structures) of any complexity on the stack ( stack ) can be processed.
Example: Faculty (using the combiner for primitive recursion):
[*] Primrec Sample call:
5 [* ] primrec what is to be understood:
- Put in order, the constant 5 and the lists and [*] to the stack.
- Primrec reads the top three stack elements. When the third is equal to 0, the second is set as a result on the stack. Otherwise, it is decremented by one, placed on the stack, and recursively called again primrec. On the way back, the first member [*] is used as a function to the two uppermost stacking elements, and the result placed back on the stack (in this case 120).