From Esolang
Jump to navigation Jump to search

Haddock2 is a theoretical esolang based the extended multiple lambda notation by user:singingbanana & user:Dan_zh.


lambda(x.x+lambda(x.x+1)) in lambda calculus can be translated into multiple lambda notation like this:


Haddock2 is a extension of this. The program portrayed above will like like this in Haddock2:

arguments ::= x
lambdas ::= 1
lambda(0) ::= lambda(lambda(1, arguments)+lambda(1)+1))
lambda(1) ::= lambda(input ::= arguments, output ::= arguments) ;Identity function


Haddock2 is Turing-complete because it applicable the A. Turing, "Computability and lambda definability" proof. It is a lambda language, so any program can be written with it, though the efficiency will be lower then Java.

useless fact.

Obviously, Haddock2 is a functional programming language.


Making an interpreter for this will be as hard as one for the Expanded Backus-Naur Form, as Haddock-2 is a meta-language (like HTML!)