<div dir="ltr">Yep, that&#39;s just a limitation within BSL.<div><br></div><div>If you&#39;re still wanting to use the student packs and not the full language, considering graduating to Intermediate Student and using locals:</div>
<div><br></div><div><br></div><div><div>(define (image-classify userImage)</div><div>  (local [(define imageHeight (image-height userImage))</div><div>          (define imageWidth (image-width userImage))]</div><div>    (cond [(&gt; imageHeight imageWidth) &quot;tall&quot;]</div>
<div>          [(= imageHeight imageWidth) &quot;square&quot;]</div><div>          [else &quot;wide&quot;])))</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 19, 2013 at 9:52 AM, Nedim M <span dir="ltr">&lt;<a href="mailto:nedimm@outlook.com" target="_blank">nedimm@outlook.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div dir="ltr"><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-family:inherit;font-size:13px;line-height:16px;white-space:pre-wrap;word-wrap:break-word;color:rgb(43,43,43)">
Hello,

I am having a trouble solving Exercise 19 (How to design programs, second edition):

Define the function image-classify, which consumes an image and produces
&quot;tall&quot; if the image is taller than it is wide, &quot;wide&quot; if it is wider
than it is tall, or &quot;square&quot; if its width and height are the same. See
exercise 10 for ideas.

Here is my code:

(require 2htdp/image)

(define (image-classify userImage)

    (define imageHeight (image-height userImage))
    (define imageWidth (image-width userImage))

    (if (&gt; imageHeight imageWidth)
        &quot;tall&quot;
        (if (= imageHeight imageWidth)
            &quot;square&quot;
        &quot;wide&quot;
        )
    )
)

Here is my code for exercise 10:

(require 2htdp/image)
(define cat &lt;imageOfCat&gt;)

(define catHeight (image-height cat))
(define catWidth (image-width cat))

(if (&gt; catHeight catWidth)
    &quot;tall&quot;

    (if (= catHeight catWidth)
        &quot;square&quot;
    &quot;wide&quot;
    )

)

Language is beginning student.
It looks like that declaring calculated constant inside function doesn&#39;t work. Example:</pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-family:inherit;font-size:13px;line-height:16px;white-space:pre-wrap;word-wrap:break-word;color:rgb(43,43,43)">
<br></pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-family:inherit;font-size:13px;line-height:16px;white-space:pre-wrap;word-wrap:break-word;color:rgb(43,43,43)"><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-family:inherit;white-space:pre-wrap;word-wrap:break-word">
(define (image-classify userImage)
(define imageHeight (image-height userImage))</pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-family:inherit;white-space:pre-wrap;word-wrap:break-word"><br></pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-family:inherit;white-space:pre-wrap;word-wrap:break-word">
<br></pre></pre></div></div><br>____________________<br>  Racket Users list:<br>  <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br><br></blockquote></div><br><br clear="all">
<div><br></div>-- <br>Thank you,<div>Zack Hickman</div><div>Freelance Web Programming/Wordpress Specialization</div><div><a href="http://www.zhickman.com/" target="_blank">http://www.zhickman.com</a></div><div><a href="mailto:zack@zhickman.com" target="_blank">zack@zhickman.com</a></div>
</div><div class="gmail_extra">
</div></div>