masak / alma

ALgoloid with MAcros -- a language with Algol-family syntax where macros take center stage
Artistic License 2.0
137 stars 14 forks source link

Add a closure test to the test suite #577

Open masak opened 1 year ago

masak commented 1 year ago

From #569:

func makeClosure() {
    my env = "closure";
    return func () { return env };
}

my c = makeClosure();
my env = "caller";
print(c());            // closure

Let's add this as a test to the test suite.