rlox/interpreter/tests/lox/function/nested_call_with_arguments.lox

13 lines
216 B
Lox
Raw Permalink Normal View History

2024-09-01 19:15:55 +02:00
fun returnArg(arg) {
return arg;
}
fun returnFunCallWithArg(func, arg) {
return returnArg(func)(arg);
}
fun printArg(arg) {
print arg;
}
returnFunCallWithArg(printArg, "hello world"); // expect: hello world