# this is a comment
println("Hello World!");
println(2 + 3 * 4);
# functions are introduced with `lambda` or `λ`
fib = lambda (n) if n < 2 then n else fib(n - 1) + fib(n - 2);
println(fib(15));
print-range = λ(a, b) # `λ` is synonym to `lambda`
if a <= b then { # `then` here is optional as you can see below
print(a);
if a + 1 <= b {
print(", ");
print-range(a + 1, b);
} else println(""); # newline
};
print-range(1, 5);
To build and run this app locally you will need a few things:
- Install Node.js
- Install TypeScript
- Install Gulp
- Clone the repository
git clone --depth=1 https://github.com/vritser/lambdanguage.git
- Install dependencies
cd lambdanguage
npm install
- Build and run
gulp build
- Testing
npm run test