On Sep 13, 2012, at 10:22 AM, Ashley Fowler wrote:

> I have to write a procedure (cube-two X Y) that takes two numeric arguments 
> and returns a list of their cubes.
>  
> So far I have...
>  
> (define cube(lambda(x)(* x x x)))...which takes ONE numeric 
> arguments...example below...
>  
> (cube 3) ==> ( 27)
> 
>  
> How could I make it to take two numeric arguments?
>  
> For instance...
>  
> (cube-two 1 4)  ==> (1  64)
> (cube-two 2 5)  ==> (8  125)

Well, it sounds like you've already done a big chunk of the work, by 
implementing 'cube'. Your best bet here is to *use* cube in order to define 
your cube-two function.

Are you using the HtDP textbook?  This would be a great time to write down a 
purpose statement and header. 

John

Attachment: smime.p7s
Description: S/MIME cryptographic signature

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to