Get the latest tech news
Show HN: Lambduck, a Functional Programming Brainfuck
--('< "if it walks like a lamb and quacks like a duck" w-w' lambduck is a functional programming language. =============================================================================== syntactic elements =============================================================================== \ | begin a lambda abstraction ----------------+-------------------------------------------------------------- ` | apply a function, e.g.
,--('< "if it walks like a lamb and quacks like a duck" w-w' lambduck is a functional programming language. =============================================================================== syntactic elements =============================================================================== \ | begin a lambda abstraction ----------------+-------------------------------------------------------------- ` | apply a function, e.g. `0 1 applies 0 to 1 ----------------+-------------------------------------------------------------- 0, 1, 99, ... | a variable as its de bruijn index in the lambda abstraction =============================================================================== built in functions =============================================================================== , | gets a character from stdin, encodes it from ascii into a | church numeral, and passes it to its argument ----------------+-------------------------------------------------------------- . =============================================================================== 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`,.
Or read this on Hacker News