Or

 

 

Or[bool,..] returns True when the first True is encountered in "bool,..".

Otherwise False is returned.

Or[{a1, b1, .., i1}, {a2, b2, .., i2}, .., {aj, bj, .., ij}]
(a.k.a. OrMatrix) is equivalent to...
{Or[a1, a2,..., aj], Or[b1, b2,..., bj],..., Or[i1, i2,..., ij]}

Or[set,..] matches the union of the PatternSets "set,..".

Or[streamObject,..] joins each "streamObject,.." in parallel (called an OrStream).

Cardinal[Or][arg1, arg2,..] (a.k.a. CardinalOr)

...returns the position where the first True element is encountered.

 



See definition for "or".

 

 

(1)        Or[argii,..]

 

...returns True at the first occurrence of True in the "argii,.." sequence.  Otherwise False is returned.

 

 

 

Or Logic Matrixes

 

Or interprets List arguments as Logic Matrixes as follows:

 

(2)                    Or[{a1, b1, .., i1}, {a2, b2, .., i2}, .., {aj, bj, .., ij}]

 

            ...is equivalent to...

 

(3)                    {Or[a1, a2,..., aj], Or[b1, b2,..., bj],..., Or[i1, i2,..., ij]}

 

If the List arguments fed to Or are not the same length, the OrMatrix will not be elicited.

 

 

CardinalOr

 

(4)                    Cardinal[Or][arg1, arg2,...]

 

...returns the Cardinal position where Or returns True, or 0 if there is no True element. Cardinal[Or][] is undefined.




Or[sets,..]


In the following, if one or more of the elements in "sets,.." is a PatternSet, then...

 

(5)        Or[sets,..]

 

...is a Logical Pattern Set that presumes some test object (like any PatternSet), and returns the union of the PatternSet(s) "sets,..".
 
While (5) defines a Logical Pattern Set, it is not actually a Set.
There are many ways to construct the actual Set. For example, the following equivalence shows how Xor and Not[Xor] can be used to efficiently generate the Set elements matching (5).

(6)        Or[sets] == Xor[Xor[sets], Not[Xor][sets]]





OrStream

 

If "strm,.." is a sequence of StreamObjects, then...

 

(7)        Or[strm,..]

 

...joins each of the "strm,.." in parallel to produce a new StreamObject whose elements are ordered Sequences with elements from each of the "strm,..".  Each element of an OrStream is a sequence constructed from each current element in the "strm,.." sequence.





"or" definition

or conj.

A coordinating particle that marks an alternative; as, you may read or may write, --that is, you may do one of the things at your pleasure, but not both.  It often connects a series of words or propositions, presenting a choice of either; as, he may study law or medicine or he may go into trade. Specific uses are to indicate:

   a Substitution; as, use olive oil or any light oil. 

   b Explanation; as, transepts, or cross aisles.

   c Correction; as, ropes, or nautically, sheets.

   d Approximation; as, two or three days.

   e Succession by turns; as, one or other of them sat by him all night.

   f Consequence; as, pay or I ll sue.

            [From Websters1949Unabridged.]

 

See also Mathematica's Or[...] function.

 


Grok32`

(c) 2004-2007 by

John Van Wie Bergamini.

All rights reserved.

Hosted by www.Geocities.ws

1