예제 #1
0
        public IVarTuple Concat(IVarTuple tuple)
        {
            Contract.NotNull(tuple, nameof(tuple));

            int n1 = tuple.Count;

            if (n1 == 0)
            {
                return(this);
            }

            int n2 = this.Count;

            if (n1 + n2 >= 10)
            {             // it's getting big, merge to a new List tuple
                return(STuple.Concat(this.Head, this.Tail, tuple));
            }
            // REVIEW: should we always concat with the tail?
            return(STuple.Concat(this.Head, this.Tail.Concat(tuple)));
        }
 public IVarTuple Concat(IVarTuple tuple)
 {
     return(STuple.Concat(this, tuple));
 }