[racket] cube-all

From: Ashley Fowler (afowler2 at broncos.uncfsu.edu)
Date: Thu Oct 4 12:17:16 EDT 2012

I need to write a function that takes a list and cubes the whole list, for instance, (cube-all '(3 4 2 5)) returns (27 64 8 125).

So far I have the code below, but it is not working out like I want it to. Any advice or suggestions?
(define cube-all
(lambda (ls)
(if (null? ls)
(cons(car ls)(cube-all (cdr ls))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121004/e6c82c21/attachment.html>

Posted on the users mailing list.