1 module orelang.Closure;
2 import orelang.operator.IOperator,
3        orelang.Engine,
4        orelang.Value;
5 
6 class Closure {
7   public {
8     Engine    engine;
9     IOperator operator;
10   }
11 
12   this (Engine engine, IOperator operator) {
13     this.engine   = engine;
14     this.operator = operator;
15   }
16 
17   Value eval(Value[] args) {
18     return this.operator.call(this.engine, args);
19   }
20 }