指定したパラメータにより匿名関数を作成し、その関数のユニークな名 前を返します。通常、args をシングルクオー トで括られた文字列で指定します。code につ いても同様に指定することが推奨されます。シングルクオートで括った 文字列を使用する理由は、パース時に変数名を保護するためです。ダブ ルクオートを使用した場合には、\$avarのように変 数名をエスケープする必要があります。
(例えば、)実行時に取得した情報から関数を作成する際にこの関数を使 用することが可能です。
Using the first array of anonymous functions parameters: 2.3445, M_PI some trig: -1.6291725057799 a hypotenuse: 3.9199852871011 b*a^2 = 4.8103313314525 min(b^2+a, a^2,b) = 8.6382729035898 ln(a/b) = 0.27122299212594 Using the second array of anonymous functions ** "Twas the night" and "Twas brilling and the slithy toves" ** Look the same to me! (looking at the first 3 chars) CRCs: -725381282 , 1908338681 similar(a,b) = 11(45.833333333333%) |
例 3コールバック関数として匿名関数を使用
|