[racket] FOR loop
If you need to introduce "variable" like that then, you need define
"for" as special syntax (perhaps using "define-syntax" and
"syntax-case"), not define "for" as a procedure.
Or, if you want to define "for" as a procedure, then there should be no
"variable" argument, and the "body" argument should be a procedure that
accepts one argument. Then, you make the "for" procedure apply the
"body" procedure on each iteration, giving "body" the value of the loop
counter as its argument.
Neil V.