/// <summary> /// Removes the specified element. /// </summary> /// <typeparam name="T">Type of elements stored in the relation</typeparam> /// <param name="rel">Unary relation</param> /// <param name="x">Element to remove</param> /// <returns>Updated relation</returns> public static ImmutableRelation <T> Remove <T>(this ImmutableRelation <T> rel, T?x) where T : struct { return(rel.Remove(x == null ? ItemMatcher <T> .Any : new ItemMatcher <T>(x.Value))); }
/// <summary> /// Removes the specified element. /// </summary> /// <typeparam name="T">Type of elements stored in the relation</typeparam> /// <param name="rel">Unary relation</param> /// <param name="x">Element to remove</param> /// <returns>Updated relation</returns> public static ImmutableRelation <T> Remove <T>(this ImmutableRelation <T> rel, T x) where T : class { return(rel.Remove(x == null ? ItemMatcher <T> .Any : new ItemMatcher <T>(x))); }