title: Scheme - 'application: not a procedure' error
body: <p>I have the following program:</p>
  
  <pre><code>(define (myFunc x e)
    (let loop ((n x) (m e) (acc 2))
      (cond   
      ( (eqv? (abs (-   ( * (expt -1 (+ acc 1)) (/ (expt n acc) acc) )    ( * (expt -1 (+ acc 1)) (/ (expt n (- acc 1) ) (- acc 1)) ) )) m)
        (begin  (display "result is: ") (display acc) #f))
      (else
          (loop (n) (m) (+ acc 1))
  
      ))
    ))
  </code></pre>
  
  <p>You can see that it calculates values, check for an equality, and if it does not succeed it repeats the loop.</p>
  
  <p>However, when i run it i get the error:</p>
  
  <blockquote>
    <p>application: not a procedure;<br>
    expected a procedure that can be
    applied to arguments<br>
    given: 0.5<br>
    arguments...: [none]</p>
  </blockquote>
  
  <p>Pointing to the loop (n) part after my 'else' statement.
  Why is this happening?</p>
  
  <p>Thanks!</p>