<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Follow the design recipe.&nbsp;</div><div><br></div><div>A natural number is one of:&nbsp;</div><div>&nbsp;-- 0&nbsp;</div><div>&nbsp;-- one more than n for some natural number n</div><div><br></div><div>Now create a template. Then fill the gaps.&nbsp;</div><div><br></div><div><br></div><br><div><div>On May 28, 2011, at 2:50 PM, Krzysztof Adamczyk wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I am having some difficulties with section 11.5 from htdp. I'm of course not the first one encountering such problems:<br><br><a href="http://lists.racket-lang.org/users/archive/2008-November/028325.html">http://lists.racket-lang.org/users/archive/2008-November/028325.html</a><br>
<br>but the above thread doesn't help in any way - Mr. Felleisen confirms that one shouldn't assume that x is a natural number. But in his next post he says that the function multiply from previous exercises should be used. Am I missing or misunderstanding something? Is it possible to multiply x by x n times with my multiply function when it needs both arguments to be natural numbers? My first idea was to use a different function, say multiply-by-inexact, which uses the + operator like multiply-by-pi, but it still needs one natural argument to stop recursion. In which direction should I go to solve this? My exponent function works for natural numbers, but I don't want to miss anything important while going through this textbook.<br>
<br>Krzysztof<br>
_________________________________________________<br> &nbsp;For list-related administrative tasks:<br> &nbsp;<a href="http://lists.racket-lang.org/listinfo/users">http://lists.racket-lang.org/listinfo/users</a></blockquote></div><br></body></html>