public LstInternal <A> InsertRange(int index, IEnumerable <A> items, Pred <A> pred) { if (items == null) { return(this); } if (index < 0 || index > Root.Count) { throw new IndexOutOfRangeException(); } return(Wrap(ListModuleM.InsertMany(Root, items, index, pred))); }
public LstInternal <A> AddRange(IEnumerable <A> items) { if (items == null) { return(this); } if (Count == 0) { return(new LstInternal <A>(items)); } return(Wrap(ListModuleM.InsertMany(Root, items, Count))); }
internal LstInternal(IEnumerable <A> items) { hashCode = 0; root = ListItem <A> .Empty; if (items is Lst <A> ) { var lst = (Lst <A>)items; root = lst.Value.Root; } else { root = ListModuleM.InsertMany(root, items, 0); } }