<div>1 I wrote the following code</div>
<div> </div>
<div>(define (test x)<br> (add1 x)<br> (define (tst x)<br> (cond<br> [(= x 1) (add1 x)]<br> else<br> (+ x 2))))<br> </div>
<div>and got error msg as</div>
<div> </div>
<div>begin (possibly implicit): no expression after a sequence of internal definitions in: ((add1 x) (define (tst x) (cond ((= x 1) (add1 x)) else (+ x 2))))</div>
<div> </div>
<div>What is wrong?</div>
<div> </div>
<div>The next two questions were posted a few minutes ago but I was not sure if they reached the website. I am putting them here</div>
<div> </div>
<div>2 I wrote<br> <br>(define (p x)<br> (+ x 10)<br> (* x 10)<br> )<br> <br>The result of (p 4) is 40. How can I display 14 and 40?<br> <br>3 How can I compare two letters in Ascii order? For example, when input are "x" and "y", the program will tell x is before y.<br>
<br>Thanks a lot.</div>