Lazy K
|
Lazy K is a functional esoteric programming language created by Ben Rudiak-Gould. It is referentially transparent and features garbage collection and a simple stream-based I/O system. Lazy K is based on SKI combinator calculus, a derivation of Lambda calculus. This language is much more minimalistic than Unlambda, the most famous functional esoteric programming language. Compared to Unlambda's seven primitive functions, Lazy K manages with only three predefined combinators: S, K, and I. Furthermore, only primitive combinators can be called, as the programming language offers no system for defining and calling functions other than the pre-existing functions. There are no numbers, there are no strings. The only data is that which can be expressed using S, K and I. There are no side-effects. It is, nevertheless, a Turing-complete programming language. It is surprisingly capable for a language in which even numeric values must be expressed as functions in the form of Church integers.
Another unusual quality of Lazy K is its flexibility of dialect. Lazy K can be written in Lisp-like CL notation, "(K(SI(KK)))", in JOT notation, which looks like "1111100011111111100000111", or in Unlambda notation, "```sii``s``s`ks``s".
Lazy K is also surprisingly compact. A complete Unlambda interpreter written in Lazy K is ten times shorter than an equivalent Unlambda interpreter written in Unlambda.
See also
External links
- Lazy K (http://homepages.cwi.nl/~tromp/cl/lazy-k.html)
- Lazy-K interpreters, compilers and sample code (http://esoteric.sange.fi/essie2/download/lazy-k/)