Sets, unions, subsets...also all like arrays
Subsets
This is the symbol for a subset
p ⊂ X
p is a subset of X
So, in programming/PHP:
array_intersect() returns an array containing all the values of array1 that are present in all the arguments. Note that keys are preserved.
Perhaps these are related?
Unions and differences
well, again, here is something that is obviously important to computer programming - unions and differences. finding intersections -- like in illustrator's pathfinder, or version control, or mysql joins
{1,2} ∪ {3,4} = {1,2,3,4}
X ∪ Y = Z
"the union of sets X and Y produce Z"
(in PHP, array_merge
$X = array(1, 2);
$Y = array(3, 4);
$Z = array_merge($X, $Y);
easy enough, but this makes me think that i should practice writing the syntax to do these because they might be useful.


Comments
Post new comment