Skip to content

vritser/lambdanguage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

λanguage

# 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);

Pre-reqs

To build and run this app locally you will need a few things:

Getting start

  • 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

Releases

No releases published

Packages

No packages published