Re: ADTs in Euphoria / Ack! correction

new topic     » topic index » view thread      » older message » newer message

-- begin snippet
if sequence(candidate)
  if length(candidate) = 3 then
    -- In this example, candidate[TNdata] can be anything....
    if (emptySequence(candidate[TNleftChild]
    or treeNode(candidate[TNleftChild]))
    and (emptySequence(candidate[TNrightChild]
    or treeNode(candidate[TNrightChild])) then
      isTreeNode = True
    else
      isTreeNode = False
    end if
  else
    isTreeNode = False
  end if
else
   isTreeNode = False
end if
-- end snippet

George Henry

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu