[Inquiry] Re: Theme One Program -- Commentary -- Deal

Jon Awbrey jawbrey at att.net
Thu Feb 3 10:44:10 CST 2005


o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o

TOP.  Commentary Note 55

o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o

Deal.

Deal is a transformation of ideas that is used to navigate
cactus graphs in a particular manner, in effect, serving as
a conditional branch-on-test operation.  Its functional value
is nil unless its argument idea points to a form whose 'sign'
field bears something besides a comma or a right parenthesis.
If the 'sign' field bears a left parenthesis but is not the
root of a Suspect graph, then the address in the 'on' field
is returned as the functional value, otherwise, the address
of the next form in the cycle of forms is returned as the
functional value.  The following figures illustrate the
cases of a non-nil result:

Case 1.  glyph (this) =/= nil;  fret (this) =/= nil.

                  ^
                  | deal (this)
              o---o
              | ( |
              o---o
              ^
         this | =/= suspect (this)
              @

Case 2.  glyph (this) =/= nil;  fret (this) = nil.

              o---o deal (this)
              | x |------------>
              o---o
              ^
         this |
              @

function deal (this: idea): idea;
var here: idea;
begin
 here := nil;
 if this <> nil then
  if glyph (this) <> nil then
   if fret (this) <> nil then here := trip (this)
    else here := next (this);
 deal := here
end;

o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o
inquiry e-lab: http://stderr.org/pipermail/inquiry/
o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o



More information about the Inquiry mailing list