<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>I need to write a function that takes a list and cubes the whole list, for instance, <span style="white-space: pre-wrap; ">(cube-all '(3 4 2 5)) returns (27 64 8 125).</span></div>
<div><span style="white-space: pre-wrap; "><br>
</span></div>
<div><span style="white-space: pre-wrap; ">So far I have the code below, but it is not working out like I want it to. Any advice or suggestions?</span></div>
<div>(define cube-all </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>(lambda (ls)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>(if (null? ls)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span> ls</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>(cons(car ls)(cube-all (cdr ls))</div>
</div>
</body>
</html>