using System; using System.Collections.Generic; namespace DeepNestLib { public static class Extensions { public static T[] splice(this T[] p, int a, int b) { List ret = new List(); for (int i = 0; i < p.Length; i++) { if (i >= a && i < (a + b)) continue; ret.Add(p[i]); } return ret.ToArray(); } public static List> splice(this List> p, int a, int b) { List> ret = new List>(); for (int i = a; i < (a + b); i++) { if (i >= a && i < (a + b)) continue; ret.Add(p[i]); } return ret; } public static NFP[] splice(this NFP[] p, int a, int b) { List ret = new List(); for (int i = 0; i < p.Length; i++) { if (i >= a && i < (a + b)) continue; ret.Add(p[i]); } return ret.ToArray(); } } }