lambduck
,--('< "if it walks like a lamb and quacks like a duck"
w-w'
lambduck is a functional programming language.
===============================================================================
special forms
===============================================================================
\ | begins a lambda abstraction
----------------+--------------------------------------------------------------
` | applies a function, e.g. `0 1 applies 0 to 1
----------------+--------------------------------------------------------------
0, 1, 99, ... | gets a variable by its de bruijn index
===============================================================================
built in functions
===============================================================================
, | gets a byte from stdin, encodes it into a church numeral, then
| calls its argument with it
----------------+--------------------------------------------------------------
. | decodes its argument from a church numeral, modulos it by 256,
| writes it to stdout as a byte, then returns its original
| argument
===============================================================================
all other characters are ignored.
===============================================================================
examples
===============================================================================
true | \\1
----------------+--------------------------------------------------------------
false | \\0
----------------+--------------------------------------------------------------
z combinator | \`\`1\``1 1 0\`1\``1 1 0
----------------+--------------------------------------------------------------
echo | `\`\`1\``1 1 0\`1\``1 1 0\`0`,.
----------------+--------------------------------------------------------------
print "@" | `.``\\``0 1``0 1``0 1``0 1``0 1 1\\`1`1 0\\\`2`1 0
===============================================================================
stdout