ALPL

From Esolang
Jump to: navigation, search

ALPL (A Lambda Programing Language) is an esoteric programming language that was invented by User:Kros.

Description

Combinators
=x (x is any character except whitespace characters or [.]`=?01.) Take one argument and store it in a variable named x. Return the argument.
? Take two arguments and one bit from input and return the first argument if the bit received was 1, else return the second argument.
0 Take one argument and return it, with the side effect of outputting a bit 0.
1 Like 0 but output bit 1 instead.
Commands
`xy Apply function x to parameter y.
[p.f] Define a function with parameters p that does f. (Every parameter name is one character long and is not whitespace or [.]`=?01.)

Examples

Print "Hi!"

````````````````````````001001000110100100100000[x.x]

Cat program

`[x.````?10xx][x.````?10xx]

Cat program version 2

`=c[x.````?10xx]`cc

Print "Hello World!"

`=H[x.````````01001000x]
`=e[x.````````01100101x]
`=l[x.````````01101100x]
`=o[x.````````01101111x]
`=_[x.````````00100000x]
`=W[x.````````01010111x]
`=r[x.````````01110010x]
`=d[x.````````01100100x]
`=![x.````````00100001x]
````````````Hello_World!_