|
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 I/O functions to make it possible to interact with the user, some shortcut functions and a function for lazy evaluation. There are no variables in the language. ==Basic principles== 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 with the technique of currying. Unlambda is based around the principle of abstraction elimination, or the elimination of all saved variables, including functions. As a purely functional language, not only are Unlambda's functions first-class objects, they are the ''only'' first-class objects. An implementation of the hello world program in Unlambda follows:〔 `r```````````.H.e.l.l.o. .w.o.r.l.di 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Unlambda」の詳細全文を読む スポンサード リンク
|