<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Olá de novo, muito obrigado pelas informacoes, meu codigo ficou muito melhor e muito menor como vode pode ver.<br>porem a minha duvida com relacao a minha chamada recursiva persiste. continuo percorrendo a arvore duas vezes e que <br>acredito nao ter necessidade. Gostaria muito de ajuda novamente.<br><br>Hi again, thanks for the informations, my code turned better and smaller like you can see. <br>However my doubt about a self-referential persist. I continue searching in the binary tree two times and<br>I believe this is not needed (lines 52-54). Is there any suggestion?<br><br>Thanks!<br>Renato. <br><br>> CC: plt-scheme@list.cs.brown.edu<br>> From: matthias@ccs.neu.edu<br>> Subject: Re: [plt-scheme] Doubt Exercise 14.2.2 HTDP<br>> Date: Fri, 20 Mar 2009 11:47:40 -0400<br>> To: renatoluciano@hotmail.com<br>> <br>> <br>> <br>> Renato, your program is missing the data definition for BTs (though I <br>> can infer it).<br>> <br>> You did not follow the design recipe to design your function. As a <br>> result,<br>> -- it works by accident<br>> -- and it is FAR MORE complex than needed.<br>> <br>> Please go step by step. Design the template with these questions in <br>> mind:<br>> <br>> 1. How many clauses are in the data definition<br>> That's how many clauses I need in the COND<br>> Formulate appropriate conditions to separate these things.<br>> <br>> 2. Which DD clauses introduce compound data<br>> In the corresponding COND clauses, you need to write down <br>> selector expressions<br>> <br>> 3. Which DD clauses use self-references, and which pieces are <br>> involved?<br>> Add recursive calls around the corresponding selector expressions.<br>> <br>> Then solve the problem as follows:<br>> <br>> A. Fill in the gaps in the non-recursive cases.<br>> B. For the recursive cases:<br>>         -- what do the various expressions compute<br>>         -- how do you combine those results to get the final answers<br>> <br>> Good luck -- Matthias<br>> <br>> <br>> <br>> <br>> <br>> <br>> <br>> On Mar 19, 2009, at 5:06 PM, Renato Dutra Luciano wrote:<br>> <br>> > Hi! I am Renato from Brazil. I am studying the 'How to Design <br>> > Programs'.<br>> > In the Section 14 more specifically in the exercise 14.2.2 I have <br>> > a doubt despite my tests are all passing.<br>> > While searching for a element on the binary tree, using the <br>> > function Boolean?, my recursive function (search-bt) does one more<br>> > search than it should. (lines 49 - 54) Is there a better way???<br>> ><br>> > Thanks!<br>> > Dutra Luciano, Renato.<br>> > Veja mapas e encontre as melhores rotas para fugir do trânsito com <br>> > o Live Search Maps! Experimente já!<14.2.2.exercise><br>> > _________________________________________________<br>> > For list-related administrative tasks:<br>> > http://list.cs.brown.edu/mailman/listinfo/plt-scheme<br>> <br><br /><hr />Diversão em dobro: <a href='http://www.microsoft.com/windows/windowslive/products/messenger.aspx' target='_new'>compartilhe fotos enquanto conversa usando o Windows Live Messenger.</a></body>
</html>