using System; namespace TLang.VM { internal class TExternalMethod : TCallable { public Func Callback {get;set;} public TExternalMethod(Func value) { Callback = (args)=>{ return value(args); }; } public override TObject Execute(params TObject[] args) { return Callback(args); } } }