1 module orelang.operator.SeqOperator;
2 import orelang.operator.IOperator,
3        orelang.Engine,
4        orelang.Value;
5 import std.conv;
6 
7 class SeqOperator : IOperator {
8   /**
9    * call
10    */
11   public Value call(Engine engine, Value[] args) {
12     long n = engine.eval(args[0]).getNumeric.to!long;
13     Value[] array;
14 
15     for (long i; i < n; ++i) {
16       array ~= new Value(i.to!double);
17     }
18 
19     return new Value(array);
20   }
21 }