1 module orelang.operator.ModOperator;
2 import orelang.operator.IOperator,
3        orelang.Engine,
4        orelang.Value;
5 
6 class ModOperator : IOperator {
7   /**
8    * call
9    */
10   public Value call(Engine engine, Value[] args) {
11     Value ret = engine.eval(args[0]);
12 
13     foreach (arg; args[1..$]) {
14       Value v = engine.eval(arg);
15       ret.modTo(v);
16     }
17 
18     return ret;
19   }
20 }