Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
b = x.find(e) != x.end();
b = x.Contains(e);
b = x(e)
A set would be realized as an array of logical variables.
b := x[e]
x has type map[E]bool
_, b := x[e]
x has type map[E]struct{}
let b = x.has(e);
x has type Set
boolean b = x.contains(e);
x is a java.util.Set
(setf b (not (null (member e x))))
b := e in x;
$b = $x{$e};
Here we are using hash variable %x as a set and assuming that when keys are inserted the corresponding value will be set to a true value; i.e. anything other than undefined or zero.
If the values could be undefined, then it would be necessary to make the expression 'exists $x{$x}'.
Alternatively, use Set::Scalar for real set operations.
If the values could be undefined, then it would be necessary to make the expression 'exists $x{$x}'.
Alternatively, use Set::Scalar for real set operations.
b = e in x
b = x.include? e
let b = x.contains(&e);
x has type HashSet