Ejemplo n.º 1
0
        public object SystemVectorRef(int index)
        {
            ISystemVector firstVec  = ((ISystemVector)first);
            int           firstSize = firstVec.SystemVectorSize;

            return((index < firstSize) ? firstVec.SystemVectorRef(index)
                : (rest == null) ? Fakeup(index)
                : rest.SystemVectorRef(index - firstSize)
                   );
        }
Ejemplo n.º 2
0
        public static bool SystemVectorRef(out object answer, object arg, object offset)
        {
            ISystemVector sysVec = arg as ISystemVector;

            if (sysVec != null)
            {
                answer = sysVec.SystemVectorRef((int)offset);
            }
            else
            {
                throw new NotImplementedException();
            }
            return(false);
        }
Ejemplo n.º 3
0
        public static bool SystemSubvectorToList(out object answer, object arg, object start, object end)
        {
            ISystemVector sysVec = arg as ISystemVector;

            if (sysVec != null)
            {
                Cons result = null;
                for (int i = (int)end - 1; i > ((int)start - 1); i--)
                {
                    result = new Cons(sysVec.SystemVectorRef(i), result);
                }
                answer = result;
                return(false);
            }
            else
            {
                throw new NotImplementedException();
            }
        }