Files
Toy/tests/scripts/test_first_class_functions.toy
T

10 lines
181 B
Plaintext

//check functions are first class citizens
fn hello() {
print "Hello world";
}
fn identity(x) {
return x;
}
assert identity(hello) == hello, "First class function check failed";