title: How to call a function in another function with scheme?
body: <p>I am learning Scheme, so I am doing a program with two functions one calculate how many planes will fly based on the number of people flying and the number of seats on a plane. Until there everything is okay, the problem is when I try to use the function in another one, I don't know how to do it.</p>
  
  <p>First function: </p>
  
  
  
  <pre class="lang-scm prettyprint-override"><code>(define calculate-aeroplanes
    (lambda (passengers seats)
      (ceiling (/ passengers seats))))
  </code></pre>
  
  <p>On the second function I want to put a fee for 1000$ for each plane, if it's less than 11 planes, from the 11th plane the fee will be 500$ , and for each passenger there will be a fee of 50$.</p>
  
  <p>Here what I did:</p>
  
  <pre class="lang-scm prettyprint-override"><code>(define fee-airport
    (lambda (passengers seats)
      (cond
        ((&lt; calculate-aeroplanes (passengers seats) 11)
         (+ (* calculate-aeroplanes 1000)
            (* passengers 50)))
        ((&gt; calculate-aeroplanes (passengers seats) 10)
         (+ (* calculate-aeroplanes (passengers seats) 10000)
            (* (- calculate-aeroplanes (passengers seats) 10) 500)
            (* passengers 50))))))
  </code></pre>