Ejemplo n.º 1
0
        /// <summary>
        ///     Adds the specified item at the beginning of the list.
        /// </summary>
        /// <param name="item"> The item to add. </param>
        /// <returns> </returns>
        public ImmList <T> AddFirst(T item)
        {
            var ret = Root.AddFirst(item, Lineage.Immutable).Wrap();

#if ASSERTS
            ret.First.AssertEqual(item);
            if (!IsEmpty)
            {
                ret.Last.AssertEqual(Last);
            }
#endif
            return(ret);
        }