public object apply(TxtLocation loc, Closure fn, object[] args) { try { return fn.fn(args); } catch (Exception e) { throw new InterpreterException(loc, "exception occured in method: " + fn.fn.Method.Name, e); } }
public void AddFn(Symbol sym, Closure.Fn fn) { definitions.Add(sym, new Closure(fn)); }