<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<div><br>Having a devil of a time trying to figure out how to assign a variable and increment a counter in a loop or process. &nbsp;Easy enough in c, but really struggling to do this in scheme.<div><br></div><div><br></div><div>(define counter 0)</div><div><br></div><div>(define (bump-counter)</div><div>&nbsp; (process repeat 5 do</div><div>(set! counter (+ counter 1))))</div><div><br></div><div>(bump-counter)</div><div><br></div><div><br></div><div>Something like that would be what I'm after. &nbsp;Tried using LET, also declaring LET or SET outside the process or a loop but still within the definition, and no joy there.</div></div><div><br></div><div>Any help for the parenthetically challenged greatly appreciated.</div><div><br></div><div>Regards,</div><div>Jim Hearon</div>                                               </div></body>
</html>