Example #1
0
        //PASS TWO LIST ARGUMENTS TO BE ZIPPED
        public static TimaList <T> Zip(TimaList <T> odd, TimaList <T> even)
        {
            //CREATE NEW ZIP LIST
            TimaList <T> zipped = new TimaList <T>();

            //ITERATE OVER BOTH LISTS ALTERNATING
            for (int i = 0; i < even.count; i++)
            {
                zipped.Add(odd[i]);
                zipped.Add(even[i]);
            }
            return(zipped);
        }
Example #2
0
        public static TimaList <T> MinusOperator(TimaList <T> odd, TimaList <T> even)
        {
            TimaList <T> newlist = new TimaList <T>();

            for (int i = 0; i < odd.count; i++)
            {
                newlist.Remove(odd[i]);
            }
            for (int i = 0; i < even.count; i++)
            {
                newlist.Remove(even[i]);
            }
            return(newlist);
        }
Example #3
0
        public static TimaList <T> PlusOperator(TimaList <T> odd, TimaList <T> even)
        {
            TimaList <T> combined = new TimaList <T>();

            for (int i = 0; i < odd.count; i++)
            {
                combined.Add(odd[i]);
            }
            for (int i = 0; i < even.count; i++)
            {
                combined.Add(even[i]);
            }
            return(combined);
        }