示例#1
0
 public static LNodeList WithoutNodeNamed(this LNodeList list, Symbol name, out LNode removedNode)
 {
     removedNode = null;
     for (int i = 0, c = list.Count; i < c; i++)
     {
         if (list[i].Name == name)
         {
             removedNode = list[i];
             return(list.RemoveAt(i));
         }
     }
     return(list);
 }
示例#2
0
        public static LNodeList Without(this LNodeList list, LNode node)
        {
            int i = list.Count;

            foreach (var item in list.ToFVList())
            {
                i--;
                if (item == node)
                {
                    Debug.Assert(list[i] == node);
                    return(list.RemoveAt(i));
                }
            }
            return(list);
        }