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

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h3> <h4> <strike> <img><iframe><embed><param><object>
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Insert Flickr images: [flickr-photo:id=230452326,size=s] or [flickr-photoset:id=72157594262419167,size=m].
  • Images can be added to this post.

More information about formatting options

Mollom CAPTCHA (play audio CAPTCHA)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.