<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
<a class="moz-txt-link-abbreviated" href="mailto:jkaczorek@aol.pl">jkaczorek@aol.pl</a> wrote at 10/31/2011 12:58 PM:<br>
<blockquote
cite="mid:8CE660583067BA6-E18-78A4E@Webmail-d112.sysops.aol.com"
type="cite"><font color="black" face="arial" size="2"><font
color="black" face="arial" size="2"><font face="Arial,
Helvetica, sans-serif">
Of course, I realize, that redefinition of the variables is
not good (functional) programming style but sometimes it’s
necessary. Is there a possibility of such modifications
without changing language?</font></font></font></blockquote>
<br>
You might wish to use a parameter, like in the example below.<br>
<br>
<br>
#lang racket<br>
<br>
(define current-counter (make-parameter 0))<br>
<br>
(current-counter) ;==> 0<br>
<br>
(current-counter 42)<br>
<br>
(current-counter) ;==> 42<br>
<br>
(current-counter (+ 1 (current-counter)))<br>
<br>
(current-counter) ;==> 43<br>
<br>
<br>
In this example, I have named your variable to start with
"current-", just by convention to emphasize that a variable is a
parameter, but that's not actually necessary.<br>
<br>
<div class="moz-signature">-- <br>
<a class="moz-txt-link-freetext" href="http://www.neilvandyke.org/">http://www.neilvandyke.org/</a>
</div>
</body>
</html>