1 module orelang.operator.TimesOperator;
2 import orelang.operator.IOperator,
3        orelang.Engine,
4        orelang.Value;
5 import std.range,
6        std.conv;
7 
8 class TimesOperator : IOperator {
9   /**
10    * call
11    */
12   public Value call(Engine engine, Value[] args) {
13     Value ret = null;
14     long n = engine.eval(args[0]).getNumeric.to!long;
15 
16     foreach (_; n.iota) {
17       ret = engine.eval(args[1]);
18     }
19 
20     return ret;
21   }
22 }