Ejemplo n.º 1
0
        public override object ApplyVarargs(Continuation k, object[] args)
        {
            Closure proc = (Closure) args[0];
            List tailList = (List) args[args.Length - 1];
            int extraCount = args.Length - 2;

            object[] newArgs = new object[tailList.ListLength() + extraCount];
            for (int i = 0; i < extraCount; i++) {
                newArgs[i] = args[i + 1];
            }
            int pos = extraCount;
            foreach (object e in tailList) {
                newArgs[pos++] = e;
            }
            return proc.ApplyVarargs(k, newArgs);
        }
Ejemplo n.º 2
0
 public abstract object ApplyVarargs(Continuation k, object[] args);
Ejemplo n.º 3
0
 public abstract object Apply(Continuation k, object a, object b, object c, object d);
Ejemplo n.º 4
0
 public abstract object Apply(Continuation k, object a);
Ejemplo n.º 5
0
 public override object Apply(Continuation k, object a, object b, object c, object d)
 {
     return ApplyVarargs(k, new object[] {a, b, c, d});
 }
Ejemplo n.º 6
0
 public override object Apply(Continuation k, object a)
 {
     return ApplyVarargs(k, new object[] {a});
 }