public Deedle.Ranges.Ranges <T> MergeWith(IEnumerable <Deedle.Ranges.Ranges <T> > ranges) { IEnumerable <Deedle.Ranges.Ranges <T> > list = (IEnumerable <Deedle.Ranges.Ranges <T> >)SeqModule.ToList <Deedle.Ranges.Ranges <T> >((IEnumerable <M0>) new Ranges.MergeWith <T>(this, ranges, 0, (Deedle.Ranges.Ranges <T>)null)); if (SeqModule.IsEmpty <Deedle.Ranges.Ranges <T> >((IEnumerable <M0>)list)) { throw new ArgumentException("Range cannot be empty", nameof(ranges)); } IRangeKeyOperations <T> operations = ((Deedle.Ranges.Ranges <T>)SeqModule.Head <Deedle.Ranges.Ranges <T> >((IEnumerable <M0>)list)).Operations; FSharpList <Tuple <T, T> > fsharpList = (FSharpList <Tuple <T, T> >)ListModule.SortWith <Tuple <T, T> >((FSharpFunc <M0, FSharpFunc <M0, int> >) new Ranges.MergeWith <T>(operations), SeqModule.ToList <Tuple <T, T> >((IEnumerable <M0>) new Ranges.MergeWith <T>(list, (Deedle.Ranges.Ranges <T>)null, (IEnumerator <Deedle.Ranges.Ranges <T> >)null, (Tuple <T, T>)null, (IEnumerator <Tuple <T, T> >)null, 0, (Tuple <T, T>)null))); FSharpFunc <Tuple <T, T>, FSharpFunc <FSharpList <Tuple <T, T> >, IEnumerable <Tuple <T, T> > > > fsharpFunc = (FSharpFunc <Tuple <T, T>, FSharpFunc <FSharpList <Tuple <T, T> >, IEnumerable <Tuple <T, T> > > >) new Ranges.MergeWith <T>(operations); IRangeKeyOperations <T> ops = operations; return(new Deedle.Ranges.Ranges <T>((IEnumerable <Tuple <T, T> >)FSharpFunc <Tuple <T, T>, FSharpList <Tuple <T, T> > > .InvokeFast <IEnumerable <Tuple <T, T> > >((FSharpFunc <Tuple <T, T>, FSharpFunc <FSharpList <Tuple <T, T> >, M0> >)fsharpFunc, (Tuple <T, T>)ListModule.Head <Tuple <T, T> >((FSharpList <M0>)fsharpList), (FSharpList <Tuple <T, T> >)ListModule.Tail <Tuple <T, T> >((FSharpList <M0>)fsharpList)), ops)); }