Branch

Branch

 

(0)                    Branch

 

…is a frequently used suffix or prefix keyword modifier.

 

Branch[test1, expr1, test2, expr2, …] a.k.a. BranchPairs

Branch[obj, …[sub_PatternSet_Expression]…] a.k.a. BranchRules

Expression[Branch][expr] a.k.a. ExpressionBranch

 

See English definition of “branch”.

 

Branch[…] is used for two distinct types of branching structures.

Which branch type is elicited depends on whether there are an even or odd number of arguments.

See also Expression[Branch].

 

 

Branch[…] Pairs

 

(1)                    Branch[test1, expr1,

                                    test2, expr2,

                                    …]

 

…returns expr1 if test1 evaluates True

Otherwise expr2 is returned if test2 evaluates True

Otherwise the next test is evaluated, and so on. 

This Branch ElicitationForm always has an even number of arguments.

 

 

Branch[obj, …rules…] Rule

 

(2)                    Branch[obj,

                                    patrn1, expr1,

                                    patrn2, expr2,

                                    …]

 

…compares obj to the PatternSet, patrn1, and if there is a match, expr1 is returned.

Otherwise, patrn2 is compared to obj, and expr2 is returned if there is a match

Otherwise the next argument is tested and so on. 

This Branch ElicitationForm always has an odd number of arguments.

Each even argument is a PatternSet

If an even argument is selected (by matching), and it is a…

            Type[nam, _PatternSet]

…construct, then nam is substituted into the subsequent expr.

 

This odd numbered argument Branch[…] construction, (2), has the equivalent ElicitationForm:

 

(3)                    Branch[obj,

                                    patrn1 expr1,

                                    patrn2 expr2,

                                    …]

 

…which is a form matching…

 

                        Branch[obj, …[_PatternSet_Expression]…].

 

The Rule is similar and related to this form of Branch.

 

 

 

ExpressionBranch

 

If expr is an Expression, (or a String which can be interpreted as an Expression), then…

 

(4)                    Expression[Branch][expr]

 

…returns a Sequence of irreducible Types like the following:

 

(5)                    …ExpressionAtom[slotSpecs]…

 

The Sequence in (5) fully specifies “expr”s structure and is called the ExpressionBranch structure (of expr). 

expr” is parsed into its Branch structure without anything being elicited.

(Invoking (4) is guaranteed to have no effect on the environment.)

 

The slotSpecs specify the ExpressionAtom’s position in the containing Expression.

The ExpressionAtom Sequence in (5) is listed in the order they will be processed when Reckoned. 

 

A leaf is a subExpression such that True[leaf ] tests True.

In other words, a leaf is a simple, unassigned Expression

(5) is the Sequence of leafs that fully specifies expr.

All leafs are ExpressionAtoms because they are irreducible Types.

 

 

ExpressionAtom

 

ExpressionAtoms are so named because they are irreducible Expressions or basic Types.

 

An ExpressionAtom has a Head and may also include binary data (as its bracketed argument). 

If an ExpressionAtom Head is (String | Cardinal | Real | Name | Compile), or a user-defined Type, then it will have (signature) binary data in the adjoined bracketed argument. 

Other Grok32` Keywords may be ExpressionAtoms, but they have no arguments except the SlotSpecification (which is attached to all elements of the ExpressionAtom Sequence returned by (4)).

 

 

English Definition of “branch” & “switch

 

branch n.

1. A stem, larger than a shoot, growing on a tree or similar plant from the trunk or from a bough; a limb; more generally, from the trunk or from a bough; a limb; more generally, Bot., a shoot or secondary stem growing from the main stem.

2. Any division extending like a branch; any arm or part connected with the main body of a thing; a ramification; as, a branch of an antler, a chandelier, or a railroad.

3. Specif.:

   a Either side of a sword hilt, forming one of the guards.

   b Either side of a horseshoe.

   c A pipe joined to and diverging from the barrel of another pipe.

4. A member or part of any complex body of work; a distinct article, section, subdivision, or department; as, a branch of the military service; branches of knowledge.

            It is a branch and parcel of mine oath.          Shak.

5. Specif.: a A subordinate local office or part of a central system or business, usually occupying independent quarters; as, a branch of a library or post office.  Cf. BRANCH

6. Arch. A rib in Gothic vaulting, generally one of the smaller ribs in a complicated vault.

7. Ethnol. A classificatory division, used esp. in the subdivision of linguistic families and stocks.  It is more inclusive than the group and less so than the stock.

8. Fort. Either wing of a crownwork or hornwork; a boyau; also, any straight part joined to another at an angle.

9. Geneal. A division of a family descended from a particular ancestor, as distinguished from division descended from the ancestor’s relatives; as, the English branch of a family; also, Now Rare, any descendant.

10. Geog. A ramification, as of a river or another stream; specif.:

    a An effluent stream; as, a delta branch.

    b A reentrant stream; a by-channel.

    c Australia. A channel in an anastomosing river or other stream; an anabranch.

    d A bay-like fork of a tidal river, as of the Seven River in Maryland.  In the United State s, in regional or local usage, branch is used chiefly to mean: (1) a principle tributary of a river, creek, or other stream: a fork or prong.  Such a branch is usually comparable in size with the main stream; as, the east branch of the Penobscot River, Me.  (2) A brook, run, or rivulet, smaller than a creek and ranging in size down to the tiniest rill.  Such branches often flow from springs or seeps.  If unfailing, they are known as perennial, and constitute an important source of rural water supply.  Intermittent branches, or torrents, are fed by periodical or occasional rains, thunderstorms, and thaws.  In sections where branch is used of a larger tributary, a smaller stream is usually termed a brook, but where branch is used of a small stream, the term fork, or, sometimes, prong, is applied to a larger tributary.  Throughout the Mississippi Valley and the South and West, streams generally are classified as rivers, creeks, and branches, according to their relative size and importance.  Branch is the accepted term for all streams of small size, and as such, appears on the maps.  The distinction in cartographic usage between branch, run, and brook is arbitrary and mainly regional, all three terms being interchanged in literature and conversation, while fixed on the map.  In  the sense of brook or run, branch is used in Ala., Ark., Del., Ill., Ky., Md., Nebr., N.Y., N.C., C., O., R.I., Vt., Va., Wash., Wis., and in other States  of the Mississippi Valley and the  Gulf coast.

See BROOK, CREEK, RUN.

11. Geom. a One of the portions of a curve, as of a hyperbola, that extends outward indefinitely. b One of the  determinations of a non-uniform function of a complex variable; as, w = Sqrt[z] has  two branches, one of which is always the negative of the other.  Cf. PARABOLIC BRANCH, HYPERBOLIC BRANCH.

12. Naut. A warrant or commission given to a pilot, authorizing him to pilot vessels in certain waters.

13. Plumbing. A forked piece of pipe; -- called a double branch when there are two offshoots from the main pipe.

14. Zool. A primary division of the animal kingdom.  See PHYLUM.

Syn. – Limb, shoot, offshoot, twig, sprig

branch v. Intrans.

1. To shoot or spread in branches; separate into branches; put forth branches; ramify.

Friths that branch and spread

            Their sleeping silver thro’ the hills.               Tennyson.

            Corals branching ‘neath the ripple.                        Browning.

2. To spring off or out from the main branch, stem, or root, as a shoot of a plant; to diverge; to deviate; --usually with out or off; as, here a bypath branches.

            To branch out into a long disputation.       Spectator.

3. To be descended or derived; -- with from. Obs.

4. Bridge. In bidding, to change from one suit to another; to switch. Eng.

Transitive:

1. To embroider with figures of branches, flowers, or foliage.

            Branched with gold and pearl, most richly wrought.       Spenser.

2. To put forth or arrange in or as in branches. Archaic.

3. To furnish with branches or horns. Obs.

4. To divide into or as into branches.

 

 

switch n.

4. An act of switching; the action or office of one who switches, as of one who tends a railroad switch; specif.:

    a A blow of a switch.

    b A turn of a switch.

    c A changing or shifting, as of investments.

5. Elec. A device for making, breaking, or changing the connections in an electrical circuit…

                                    [From Websters1949Unabridged.]

 

 


Grok32`

© 2004 by John Van Wie Bergamini. All rights reserved.

Hosted by www.Geocities.ws

1