title: Binary Trees Count Number of Leaves
body: <p>Suppose you already have the basic binary tree procedures isempty(bt), root(bt), left(bt), and right(bt). Write a procedure isLeaf(bt) that returns true if the binary tree bt is a leaf node and false if it is not.</p>
  
  <p>This is what I have:</p>
  
  <pre><code>proc isLeaf(bt)
  if (isEmpty(bt))
  error('The binary tree is empty.');
  elseif (left(bt) &lt; right(bt))
  return true;
  else return false;
  </code></pre>
  
  <p>Then write a procedure numLeaves(bt) that returns the number of leaves in the binary tree bt.</p>
  
  <p>This is what I have:</p>
  
  <pre><code>proc numLeaves(bt)
  if (isEmpty(bt))
  error ('The binary tree is empty.');
  elseif (count left(bt) + right(bt));
  return (left(bt) + right(bt);
  </code></pre>
  
  <p>please could you correct?</p>