nLang is an interpreted, procedural language with static type checking.
To compile the project:
makeAfterwards interpreter binary should be created in the current directory. To run it pass the path to the source code.
./interpreter code.n- Functions: First-class functions with recursion, passing as arguments, and function literals
- Operations: Arithmetic, comparisons, and compound assignments (+=, -=, etc.)
- Arrays: Integer-indexed arrays and dictionaries
- Scoping: Static binding with nested function definitions and variable shadowing
- I/O: Built-in print function for output
int printAfterChange (int a, int(int) f) {
printInt(f(a));
};
main() {
int x(int a) {return a + 1;};
printAfterChange(2,x);
}
Program Semantics and Verification course at the Faculty of Mathematics, Informatics, and Mechanics, University of Warsaw