<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Which leads to question: when to use nested define and when to use let?<br><br><div><div id="SkyDrivePlaceholder"></div>> From: matthias@ccs.neu.edu<br>> Date: Sun, 11 Mar 2012 19:14:38 -0400<br>> To: jgilray@gmail.com<br>> CC: users@racket-lang.org; justin@zamora.com<br>> Subject: Re: [racket] spirit of Racket?<br>> <br>> <br>> I believe the code below cuts your running time to one third. -- Matthias<br>> <br>> #lang racket<br>> <br>> (require srfi/13)<br>> <br>> (define (euler4e)<br>> (for*/fold ([greatest 0]) ([first (in-range 101 1000)] [second (in-range first 1000)])<br>> (define prod (* first second))<br>> (if (palindromic? prod) (max greatest prod) greatest)))<br>> <br>> (define (palindromic? n)<br>> (define s (number->string n))<br>> (define r (string-reverse s))<br>> (string=? s r))<br>> <br>> <br>> ____________________<br>> Racket Users list:<br>> http://lists.racket-lang.org/users<br></div>                                            </div></body>
</html>