*** Welcome to piglix ***

Unlambda

Unlambda
Paradigm Nearly pure functional
Designed by David Madore
Developer David Madore
First appeared 28 June 1999; 17 years ago (1999-06-28)
Stable release
2.0.0 / 20 December 1999; 17 years ago (1999-12-20)
Typing discipline Untyped
Implementation language Scheme, C, Java
License GPL 2.0 or later
Website www.madore.org/~david/programs/unlambda

Unlambda is a minimal, "nearly pure"functional programming language invented by David Madore. It is based on combinatory logic, a version of the lambda calculus that omits the lambda operator. It relies mainly on two built-in functions (s and k) and an apply operator (written `, the backquote character). These alone make it Turing-complete, but there are also some input/output (I/O) functions to enable interacting with the user, some shortcut functions, and a lazy evaluation function. Variables are unsupported.

Unlambda is free and open-source software distributed under a GNU General Public License (GPL) 2.0 or later.

As an esoteric programming language, Unlambda is meant as a demonstration of very pure functional programming rather than for practical use. Its main feature is the lack of conventional operators and data types—the only kind of data in the program are one-parameter functions. Data can nevertheless be simulated with appropriate functions as in the lambda calculus. Multi-parameter functions can be represented via the method of currying.

Unlambda is based on the principle of abstraction elimination, or the elimination of all saved variables, including functions. As a purely functional language, Unlambda's functions are first-class objects, and are the only such objects.

Here is an implementation of a hello world program in Unlambda:

The notation .x denotes a function which takes one argument and returns it unchanged, printing the single character x as a side effect when it is invoked. i represents the version of the identity function that has no such side effect; it is used here as a dummy argument. The program `.di applies the d-printing function to a dummy argument of i, returning i and printing the letter d as a side effect. Similarly, ``.l.di first applies .l to .d, printing the letter l and returning .d; this result of .d is then applied to i as in the previous example. The function r is syntactic sugar for the function that prints a newline character.


...
Wikipedia

...