public IValue Subtract(Context context, IValue value) { if (value is ListValue) { SetValue set = new SetValue(this.ItemType); value = set.Add(context, value); } if (value is SetValue) { ListValue result = new ListValue(ItemType); result.AddRange(this); result.RemoveAll(item => ((SetValue)value).HasItem(context, item)); return(result); } else { throw new SyntaxError("Illegal : List - " + value.GetType().Name); } }