# NOT RUN {
s = Set$new(1:5)
# Simplest case
s$contains(4)
8 %inset% s
# Test if multiple elements lie in the set
s$contains(4:6, all = FALSE)
s$contains(4:6, all = TRUE)
# Check if a tuple lies in a Set of higher dimension
s2 = s * s
s2$contains(Tuple$new(2,1))
c(Tuple$new(2,1), Tuple$new(1,7), 2) %inset% s2
# }
Run the code above in your browser using DataLab