procedure(myfunc(fun @rest args)
printf("Calling %s passing %L" fun args)
result=apply(fun args)
printf("\nReturning from %s with %L\n" fun args)
result
);end procedure
输出:
Skill > myfunc('plus 1 2 2)
Calling plus passing (1 2 2)
Returning from plus with (1 2 2)
5
Skill > myfunc('plus 2 3 4 5 6 7)
Calling plus passing (2 3 4 5 6 7)
Returning from plus with (2 3 4 5 6 7)
27
Skill >