tm_setsubtract Function
The tm_setsubtract function returns a new set containing the elements from the first set that are not present in the second set. In other words, it computes the relative complement of the second set.
hcl
tm_setsubtract(a, b)Examples
sh
tm_setsubtract(["a", "b", "c"], ["a", "c"])
toset([
"b",
])Set Difference (Symmetric Difference)
sh
tm_setunion(tm_setsubtract(["a", "b", "c"], ["a", "c", "d"]), tm_setsubtract(["a", "c", "d"], ["a", "b", "c"]))
toset([
"b",
"d",
])Related Functions
tm_setintersectioncomputes the intersection of multiple setstm_setproductcomputes the Cartesian product of multiple sets.tm_setunioncomputes the union of multiple sets.