In this stage, you'll add support for higher order functions in your phaeton
For example, if test.phn contains the following
var globalGreeting = "Hello";
fun makeGreeter() {
fun greet(name) {
print globalGreeting + " " + name;
}
return greet;
}
var sayHello = makeGreeter();
sayHello("Bob");
The tester will run your program like this:
$ ./your_program.sh run test.phn
Hello Bob
In this stage, you'll add support for higher order functions in your phaeton
For example, if test.phn contains the following
The tester will run your program like this: