なぜこの3つは、最初の関数のように未評価の引数を返さないのでしょうか?最後の2つを最初の関数と同じように動作させる方法はありますか?関数内では、eはまだ未評価のままです。これは、結果が返されるときに発生するようです。
names default to here(1);
ns = New Namespace("n");
foo = function({e}, Name Expr(e) );
ns:bar = function({e}, Name Expr(e) );
show( foo( expr( notavar ) ) ); // expected returns notavar, unevalauted
show( here:foo( expr( notavarhere ) ) ); // unexpected tries to evaluate notavarhere
show( ns:bar( expr( notavarns ) ) ); // unexpected tries to evaluate notavarns
関数内部では、予想通りeは評価されません。
ns:bart = function( {e}, Show( Name Expr(e) ) );
ns:bart( expr( notavar ) ); // expected, unevaluated
関数を現在のデフォルト名前空間にコピーするという、あまり魅力的とは言えない回避策はありますが、ネストされた関数呼び出しの問題を解決することはできません。
localbar = name expr( ns:bar );
show( localbar( expr( notavar ) ) ); // expected, unevaluated