<div class="gmail_quote">Hi,<br><br>On Tue, Feb 21, 2012 at 12:49, Roelof Wobben <span dir="ltr">&lt;<a href="mailto:r.wobben@home.nl">r.wobben@home.nl</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I have this script :<br>
<br>
(define (nettoloon h)<br>
  ( - (brutoloon h) (belasting h)))<br>
<br>
(define (belasting h)<br>
  (cond<br>
    [(&lt; (brutoloon h) 240) (* 0 (brutoloon h))]<br>
    [(and (&lt; (brutoloon h) 480)  (&gt; (brutoloon h) 240)) ( * 0.15 (brutoloon h))]<br>
    [else ( * 0.28 ( nettoloon h))]))<br>
<br>
(define (brutoloon h)<br>
  (* 12 h))<br>
<br>
But it seems there a error in belasting.<br>
When I do (belasting 239) I don&#39;t get a answer but a memory error problem. And I don&#39;t see why this happens.<br>
<br>
Can anyone help me finding out what is wrong here ?<br>
<br></blockquote><div><br> <br>In computing (belasting 239) the first 2 cond-clauses are false, then in the else clause you compute (nettoloon 239).<br>In computing (nettoloon 239) you need to compute (belasting 239) again, and so you get into an infinite loop.<br>

<br><br>If you use one of the Student languages, you can use the Stepper to see step-by-step what is going on.<br><br><br>[]&#39;s<br><br>Rodolfo<br></div></div><br>