λx.
λx. is a esolang version of lambda calculus created by User:Yayimhere. it's a 4 instruction esolang
how it works
λx. works like lambda calculus(written a little differently) but the only thing you can do is the λx.
hence the name. its written like this:
λx. (A)
this creates a function A which can be used in other functions. now the only thing you can add is more λx.
's inside. so this is a valid expression:
λx. (λx. ) (A)
this is not:
λx. x (A)
other than that it evaluates normally. to reference a function A with input x:
λx(A)
there is a 3 extra rule for reduction:
- two functions nested(so for example
λx.λy.
with nothing in the body will move together(so the example provided before becomesλxy.λ.
) - a empty function with no arguments nor a body will simplify to nothing
- a function with no body but a argument will just leave the argument(so
λxy.
becomesxy
)
and a 2 changes:
- if something encased by brackets and does not hold a function the bracket will no be lifted
- beta reduction applies to the function inputs
also Ẏ
is replaced with user input and ẋ
will output the following expression. else than these changes nothing id diffrent from normal lambda calculus
a simple example
heres a simple example:
λx. (λy. (λx.λy.) (A) ) (B) λλworld(A)hello(B)
this simplifies to:
(hello world.)
so that function reverses the input
examples
λinput. λinput. (cat) ẋ λẎ(cat)
identity function:
λx. λx. (identity)