<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" size=2>You still have some parentheses wrong. See 
my anseer in private mail.</FONT></DIV>
<DIV><FONT face="Courier New" size=2>Jos</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=adityashukla1983@gmail.com 
  href="mailto:adityashukla1983@gmail.com">aditya shukla</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=jos.koot@telefonica.net 
  href="mailto:jos.koot@telefonica.net">Jos Koot</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=plt-scheme@list.cs.brown.edu 
  href="mailto:plt-scheme@list.cs.brown.edu">PLT Scheme ML</A> ; <A 
  title=plt-edu-discuss@list.cs.brown.edu 
  href="mailto:plt-edu-discuss@list.cs.brown.edu">plt-edu-discuss@list.cs.brown.edu</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, February 17, 2009 10:47 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [plt-scheme] Combining 
  digits to form numbers</DIV>
  <DIV><BR></DIV><BR>I removed the bugs from the cond condition .<BR><BR>(define 
  check-guess3 (lambda(lsb csb msb 
  target)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  (cond<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  [(&lt; (guess lsb csb msb) target) 
  'Toosmall]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  [(= (guess lsb csb msb) target) 
  'Perfect]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  [else 'Toolarge])))<BR>(define guess (lambda (lsb csb 
  msb)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  (+(* msb 100)(* csb 10) (* lsb 1))))<BR><BR><BR>For removing the function call 
  twice with the same argument i can i call it before cond and store the return 
  value in a variable .can it be done like this<BR><BR>(define check-guess3 
  (lambda(lsb csb msb 
  target)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  define guess-n (guess lsb csb 
  msb)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  (cond<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  [(&lt; guess-n target) 
  'Toosmall]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  [(= guess-n target) 
  'Perfect]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  [else 'Toolarge])))<BR>(define guess (lambda (lsb csb 
  msb)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  (+(* msb 100)(* csb 10) (* lsb 1))))<BR><BR><BR>After doing this i get the 
  error<BR><BR>lambda: expected only one expression for the function body, but 
  found at least one extra part<BR><BR>How can i fix this 
  error?<BR><BR><BR>Aditya<BR><BR></BLOCKQUOTE></BODY></HTML>